diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2017-09-04 13:53:03 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2017-09-04 13:53:03 -0300 |
commit | b9934ffa08dc2332bea03cae0536101b7b35562e (patch) | |
tree | 1feb8fe4635800cc8133d587e99955a342fac305 /ProcessList.c | |
parent | 65ec0bd6a62a547b4a562710e47402c516a29779 (diff) |
minor style tweak
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ProcessList.c b/ProcessList.c index 19311cab..aea57e7e 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -234,12 +234,13 @@ void ProcessList_sort(ProcessList* this) { while (l < r) { int c = (l + r) / 2; pid_t pid = ((Process*)(Vector_get(this->processes, c)))->pid; - if (ppid == pid) + if (ppid == pid) { break; - else if (ppid < pid) + } else if (ppid < pid) { r = c; - else + } else { l = c + 1; + } } // If parent not found, then construct the tree with this root if (l >= r) { |