]> granicus.if.org Git - procps-ng/commit
library: play catchup with a new proc_t 'cgname' field
authorJim Warner <james.warner@comcast.net>
Sun, 3 Jul 2016 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 6 Jul 2016 11:33:17 +0000 (21:33 +1000)
commit5d54dc0d2e36dba6f2b702e369486fd15862e920
treeb27321d28ee5eeb919a848defd47c1c6820946ca
parentc15aea9d08a11af444aeb290f574a778c6fa7f84
library: play catchup with a new proc_t 'cgname' field

Since we're about to break the ABI/API anyway, why not
go ahead and add yet another field to our proc_t which
the newlib branch has had for awhile. This then allows
the top program to offer 'control group name' and will
also permit a few reductions in that ps program logic.

And let's also clean up some unrelated warnings below.

Clang warnings:
proc/readproc.c:1178:50: warning: address of array 'ent->d_name' will always evaluate to 'true' [-Wpointer-bool-conversion]
    if(unlikely(unlikely(!ent) || unlikely(!ent->d_name))) return 0;
                                           ~~~~~~^~~~~~
proc/readproc.c:1205:50: warning: address of array 'ent->d_name' will always evaluate to 'true' [-Wpointer-bool-conversion]
    if(unlikely(unlikely(!ent) || unlikely(!ent->d_name))) return 0;
                                           ~~~~~~^~~~~~

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/readproc.c
proc/readproc.h