]> granicus.if.org Git - procps-ng/commit
library: normalized the 'read_failed' guys across APIs
authorJim Warner <james.warner@comcast.net>
Mon, 22 Feb 2021 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Sun, 28 Feb 2021 10:18:26 +0000 (21:18 +1100)
commitf4e9195149547b97c0064a50a0587e13d5e5fc55
tree4bb6a53cf63dcfca45d495b466397ff8cee28a03
parent3d0e7f3d03253f86a53804a84959d2d6fc903567
library: normalized the 'read_failed' guys across APIs

This patch will condense some logic in those functions
associated with the file input operations. The changes
will not, for the most part, alter any generated code.

More significantly (though not very) was the change to
two 'strtoul' calls. Since the returned 'endptr' value
isn't exploited, when that parm is set to NULL, we can
save one instruction on each side of such calls (wow).

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