library: final tweaks to code and/or comments, 3rd gen
With the dust now settling on all those 3rd generation upgrades, this patch tries to provide some consistency among the separate modules involved. Someday we should consider a 4th generation where all redundant code has been removed and isolated in a new shared source file. Following is a summary of significant changes (if any) to each of these now upgraded 3rd gen library modules. <meminfo> ............................................ . strictly formatting/comment changes, code unaffected <pids> ............................................... . replaced a local mkSTR macro with existing STRINGIFY . added fetch narrative explaining duplicate addresses <slabinfo> ........................................... . rearranged some free logic for procps_slabinfo_unref . added fetch narrative explaining duplicate addresses <stat> ............................................... . added #define ENFORCE_LOGICAL, just as in <slabinfo> . replaced a local mkSTR macro with existing STRINGIFY . alphabetized the function declarations in the header <vmstat> ............................................. . made one coverity concession with read_vmstat_failed [ several of these changes may reflect this author's ] [ continuing pursuit of an unreasonable goal -- that ] [ of a 'perfect' (plus 'pretty') C language program! ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#define MEMINFO_FILE "/proc/meminfo"
|
||||
|
||||
|
||||
struct meminfo_data {
|
||||
/** == man 5 proc shows these as: to be documented, so the hell with 'em */
|
||||
unsigned long Active;
|
||||
@@ -445,6 +446,7 @@ static struct {
|
||||
{ RS(SWAP_TOTAL), RG(SWAP_TOTAL) },
|
||||
{ RS(SWAP_USED), RG(SWAP_USED) },
|
||||
|
||||
// dummy entry corresponding to PROCPS_MEMINFO_logical_end ...
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user