library: more tweaks for code and/or comments, 3rd gen
Following is a summary of significant changes (if any) to each of these now upgraded 3rd gen library modules. <meminfo> ............................................ . eliminated duplicate decl of 'struct procps_meminfo' . standardized/normalized results struct union members . added 'std' & 'var' dividers in .c file, like <pids> . how did i miss relocating all these friggin' #undefs . cleanup 'get' return logic (remove a redundant 'if') <pids> ............................................... . repositioned the procps_pidsinfo structure in header . removed the extra trailing comma from enum pids_item . standardized/normalized results struct union members <slabinfo> ........................................... . corrected comment typo (jeeze, in an 'aligned' para) . standardized/normalized results struct union members . added 'std' & 'var' dividers in .c file, like <pids> . removed an obsolete #undef from procps_slabinfo_sort . cleanup 'get' return logic (remove a redundant 'if') <stat> ............................................... . how did i miss relocating all these friggin' #undefs . corrected an initialization fencepost used with numa <=== see Craig, here's a bug fix . removed the extra trailing comma from enum stat_item . standardized/normalized results struct union members . added 'std' & 'var' dividers in .c file, like <pids> . strengthen those parm checks in procps_stat_get func . cleanup 'get' return logic (remove a redundant 'if') <vmstat> ............................................. . standardized/normalized results struct union members . added 'std' & 'var' dividers in .c file, like <pids> . cleanup 'get' return logic (remove a redundant 'if') [ virtually all of these tweaks reflect the 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:
@ -60,7 +60,7 @@ enum stat_item {
|
||||
PROCPS_STAT_SYS_DELTA_INTERRUPTS, // s_int
|
||||
PROCPS_STAT_SYS_DELTA_PROC_BLOCKED, // s_int
|
||||
PROCPS_STAT_SYS_DELTA_PROC_CREATED, // s_int
|
||||
PROCPS_STAT_SYS_DELTA_PROC_RUNNING, // s_int
|
||||
PROCPS_STAT_SYS_DELTA_PROC_RUNNING // s_int
|
||||
};
|
||||
|
||||
enum stat_reap_type {
|
||||
@ -71,9 +71,9 @@ enum stat_reap_type {
|
||||
struct stat_result {
|
||||
enum stat_item item;
|
||||
union {
|
||||
signed int s_int;
|
||||
signed long sl_int;
|
||||
unsigned long ul_int;
|
||||
signed int s_int;
|
||||
signed long sl_int;
|
||||
unsigned long ul_int;
|
||||
unsigned long long ull_int;
|
||||
} result;
|
||||
};
|
||||
|
Reference in New Issue
Block a user