miscellaneous: clean up trailing whitespace throughout
The entire tree's polluted with inappropriate trailing whitespace. This commit rids our environment of all of those useless keystrokes. Unfortunately, it sure ain't a permanent solution and requires every contributor to instruct their editor(s) to prevent or eliminate them. Plus it's strongly recommended we all insert something like what's shown below to our '.gitconfig' file so as to provide at least some warnings when we try to apply any patches (git am) that do contain the #@!%& things! References(s): ~/.gitconfig excerpt --------------------------------- [core] whitespace = trailing-space, space-before-tab, blank-at-eof [apply] whitespace = warn --------------------------------- ~/.gitconfig excerpt Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
committed by
Jaromir Capik
parent
7b708ca334
commit
fe75e26ab6
20
proc/slab.c
20
proc/slab.c
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* slab.c - slab related functions for libproc
|
||||
*
|
||||
* Chris Rivera <cmrivera@ufl.edu>
|
||||
@@ -62,7 +62,7 @@ static struct slab_info *get_slabnode(void)
|
||||
|
||||
/*
|
||||
* slab_badname_detect - return true if current slab was declared with
|
||||
* whitespaces for instance
|
||||
* whitespaces for instance
|
||||
* FIXME :Other cases ?
|
||||
*/
|
||||
|
||||
@@ -72,9 +72,9 @@ static int slab_badname_detect(const char *restrict buffer)
|
||||
while (*buffer){
|
||||
if((*buffer)==' ')
|
||||
numberarea=1;
|
||||
if(isalpha(*buffer)&&numberarea)
|
||||
if(isalpha(*buffer)&&numberarea)
|
||||
return 1;
|
||||
buffer++;
|
||||
buffer++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ void free_slabinfo(struct slab_info *list)
|
||||
}
|
||||
|
||||
// parse_slabinfo20 - actual parse routine for slabinfo 2.x (2.6 kernels)
|
||||
// Note: difference between 2.0 and 2.1 is in the ": globalstat" part where version 2.1
|
||||
// Note: difference between 2.0 and 2.1 is in the ": globalstat" part where version 2.1
|
||||
// has extra column <nodeallocs>. We don't use ": globalstat" part in both versions.
|
||||
//
|
||||
// Formats (we don't use "statistics" extensions)
|
||||
@@ -117,7 +117,7 @@ void free_slabinfo(struct slab_info *list)
|
||||
// : slabdata <active_slabs> <num_slabs> <sharedavail> \
|
||||
// : globalstat <listallocs> <maxobjs> <grown> <reaped> <error> <maxfreeable> <freelimit> <nodeallocs> \
|
||||
// : cpustat <allochit> <allocmiss> <freehit> <freemiss>
|
||||
//
|
||||
//
|
||||
// slabinfo - version: 2.0
|
||||
// # name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> \
|
||||
// : tunables <batchcount> <limit> <sharedfactor> \
|
||||
@@ -158,8 +158,8 @@ static int parse_slabinfo20(struct slab_info **list, struct slab_stat *stats,
|
||||
|
||||
assigned = sscanf(buffer, "%" STRINGIFY(SLAB_INFO_NAME_LEN)
|
||||
"s %d %d %d %d %d : tunables %*d %*d %*d : \
|
||||
slabdata %d %d %*d", curr->name,
|
||||
&curr->nr_active_objs, &curr->nr_objs,
|
||||
slabdata %d %d %*d", curr->name,
|
||||
&curr->nr_active_objs, &curr->nr_objs,
|
||||
&curr->obj_size, &curr->objs_per_slab,
|
||||
&curr->pages_per_slab, &curr->nr_active_slabs,
|
||||
&curr->nr_slabs);
|
||||
@@ -244,7 +244,7 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats,
|
||||
if (assigned < 6) {
|
||||
fprintf(stderr, "unrecognizable data in your slabinfo version 1.1\n\r");
|
||||
if(slab_badname_detect(buffer))
|
||||
fprintf(stderr, "Found an error in cache name at line %s\n", buffer);
|
||||
fprintf(stderr, "Found an error in cache name at line %s\n", buffer);
|
||||
curr = NULL;
|
||||
break;
|
||||
}
|
||||
@@ -264,7 +264,7 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats,
|
||||
|
||||
if (curr->obj_size)
|
||||
curr->objs_per_slab = curr->pages_per_slab *
|
||||
page_size / curr->obj_size;
|
||||
page_size / curr->obj_size;
|
||||
|
||||
stats->nr_objs += curr->nr_objs;
|
||||
stats->nr_active_objs += curr->nr_active_objs;
|
||||
|
Reference in New Issue
Block a user