]> granicus.if.org Git - procps-ng/commit
library: accumulated changes to <pids> code & comments
authorJim Warner <james.warner@comcast.net>
Fri, 28 Aug 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 31 Aug 2015 07:46:53 +0000 (17:46 +1000)
commite169b41a8523b8683d7ed35f7015b6c1f2975a09
tree58f2b258c0edbfc396607b49bc156f212db16a4c
parentd0b28bcefde825d94081591ce91cf46316e6c254
library: accumulated changes to <pids> code & comments

A patch containing the following miscellaneous tweaks:

. avoided distortions unique to PROCPS_PIDS_TICS_DELTA
. addressed several smatch warnings and/or suggestions
. ensured oldproc_close invoked should tally_proc fail
. keeping that namespace clean, added a missing #undef
. added 2 comments acknowledging pids_item as unsigned
. added/clarified comments regarding proc flags & strv

From smatch analysis:
. these were indeed boo-boos
pids.c:580 make_hist() warn: the 'Hr' macro might need parens
pids.c:1058 procps_pids_reap() warn: variable dereferenced before check 'info' (see line 1056)
. these were not errors (and we did double check)
pids.c:1067 procps_pids_reap() warn: double check that we're allocating correct size: 8 vs 128
pids.c:1068 procps_pids_reap() warn: double check that we're allocating correct size: 8 vs 128

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