The way that the passed sort order was validated would
allow the invalid 0 to fall between the sofa cushions.
So this patch will simply close that former oversight.
Signed-off-by: Jim Warner <james.warner@comcast.net>
// a pids_item is currently unsigned, but we'll protect our future
if (sort < 0 || sort > PROCPS_PIDS_noop)
return NULL;
- if (order < -1 || order > +1)
+ if (order != PROCPS_SORT_ASCEND && order != PROCPS_SORT_DESCEND)
return NULL;
if (numstacked < 2)
return stacks;