Messages in this thread | | | Date | Mon, 8 Sep 2008 08:42:43 -0700 | From | "Paul Menage" <> | Subject | Re: Re: [PATCH] cgroup(fix critical bug): new handling for tasks file |
| |
On Mon, Sep 8, 2008 at 1:19 AM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote: > >> + while (index < end) { >> + int mid = (index + end) / 2; >> + if (cgrp->tasks_pids[mid] == pid) { >> + index = mid; >> + break; >> + } else if (cgrp->tasks_pids[mid] <= pid) > > (cgrp->tasks_pids[mid] <= pid) ===> (cgrp->tasks_pids[mid] < pid)
Given the "if" test directly above, those two are equivalent.
Paul
| |