]> granicus.if.org Git - procps-ng/commitdiff
miscellaneous: clean up trailing whitespace once again
authorJim Warner <james.warner@comcast.net>
Sun, 31 Mar 2013 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Sun, 7 Apr 2013 08:05:01 +0000 (18:05 +1000)
An earlier commit attempted to cleanse our environment
of all useless trailing whitespace. But the effort did
not catch 'empty' lines with a single space before ^J.

This commit hopefully finishes off the earlier effort.
In the meantime, let's pray that contributors' editors
are configured so that such wasted crap is disallowed!

Reference(s):
commit fe75e26ab64dab88762230db0797e765507b73ac

Signed-off-by: Jim Warner <james.warner@comcast.net>
12 files changed:
COPYING.LIB
contrib/response.filtered-with-patches.err
contrib/utmp.c
pgrep.c
proc/COPYING
proc/escape.c
proc/slab.c
proc/sysinfo.c
proc/version.c
slabtop.c
tload.c
w.c

index a042de4c2222e7616eb6ad5cd04089d08b6b48c0..12735e6c21959f1c5db16aac184480f94697ef7f 100644 (file)
@@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
 on the Library (independent of the use of the Library in a tool for
 writing it).  Whether that is true depends on what the Library does
 and what the program that uses the Library does.
+
   1. You may copy and distribute verbatim copies of the Library's
 complete source code as you receive it, in any medium, provided that
 you conspicuously and appropriately publish on each copy an
index 6d235e0a3500302bbbf0fae1d859c7aa54c34dbc..687a20b6016a1d9b5c3271e9960c5b0015175d90 100644 (file)
@@ -145,9 +145,9 @@ Error: OVERRUN_STATIC:
        Thus it (39th element) cannot be used in referencing Fieldstab.
        However, two enums of higher value (X_XON=40 and X_XOF=41) *can* appear in those arrays.
        But the test against the fencepost ensures that those two enums are *never* used in referencing Fieldstab.
-       
+
        When the analyzer sees the conditional using '<' and not '<=' it reports a false positive.
-       
+
        i'm tired of explaining this so the program was changed to accommodate the tool's deficiency
        my_category: unavoidable_false_positive_but_patched_anyway
 top.c:1417: overrun-local: Overrunning static array "Fieldstab", with 39 elements, at position 39 with index variable "f".
index dc196d92827a04e6bc9ed5338f9d22e4dad6d682..00ebc55db872900ce7d59c2351329fb2f3456376 100644 (file)
@@ -65,7 +65,7 @@ int main (int argc, char **argv) {
     exit(1);
   }
 
+
   if (list) {
     ut = fopen(UTMP_FILE, "r");
     while (fread(&uts, sizeof(uts), 1, ut))
@@ -106,7 +106,7 @@ int main (int argc, char **argv) {
        printf("ut_user: %s\n", user);
        printf("ut_host: %s\n", host);
        printf("ut_addr: %d\n\n", uts.ut_addr);
+
        printf("Modify this record? (y/N): "); fflush(stdout);
        /* Ask if to delete or no */
        if ((ch = getchar()) == 'y' || ch == 'Y') {
diff --git a/pgrep.c b/pgrep.c
index 7c54d964747565fe1b0a982eb4e5966edd3a2b97..6bc38ef71ee6d55fd5d096d9629618eb70757a1d 100644 (file)
--- a/pgrep.c
+++ b/pgrep.c
@@ -451,7 +451,7 @@ static struct el * select_procs (int *num)
 
        if (opt_newest) saved_pid = 0;
        if (opt_oldest) saved_pid = INT_MAX;
-       
+
        memset(&task, 0, sizeof (task));
        while(readproc(ptp, &task)) {
                int match = 1;
@@ -583,7 +583,7 @@ static struct el * select_procs (int *num)
 
 
                }
-       
+
 
 
 
@@ -663,9 +663,9 @@ static void parse_opts (int argc, char **argv)
                /* These options are for pgrep only */
                strcat (opts, "lad:vw");
        }
-       
+
        strcat (opts, "LF:cfnoxP:g:s:u:U:G:t:?Vh");
-       
+
        while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != -1) {
                switch (opt) {
                case SIGNAL_OPTION:
index a042de4c2222e7616eb6ad5cd04089d08b6b48c0..12735e6c21959f1c5db16aac184480f94697ef7f 100644 (file)
@@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
 on the Library (independent of the use of the Library in a tool for
 writing it).  Whether that is true depends on what the Library does
 and what the program that uses the Library does.
+
   1. You may copy and distribute verbatim copies of the Library's
 complete source code as you receive it, in any medium, provided that
 you conspicuously and appropriately publish on each copy an
index 68b66e269380d41dc5d7daee23a21f8fedf2a193..971c5d819e1d835c8da4a5c44c4201e5530d74ac 100644 (file)
@@ -37,20 +37,20 @@ static int escape_str_utf8(char *restrict dst, const char *restrict src, int buf
   int my_cells = 0;
   int my_bytes = 0;
   mbstate_t s;
+
   memset(&s, 0, sizeof (s));
+
   for(;;) {
     wchar_t wc;
     int len = 0;
-       
+
     if(my_cells >= *maxcells || my_bytes+1 >= bufsize)
       break;
+
     if (!(len = mbrtowc (&wc, src, MB_CUR_MAX, &s)))
       /* 'str' contains \0 */
       break;
+
     if (len < 0) {
       /* invalid multibyte sequence -- zeroize state */
       memset (&s, 0, sizeof (s));
@@ -65,7 +65,7 @@ static int escape_str_utf8(char *restrict dst, const char *restrict src, int buf
       src+=len;
       my_cells++;
       my_bytes++;
+
     } else {
       /* multibyte - printable */
       int wlen = wcwidth(wc);
@@ -103,7 +103,7 @@ static int escape_str_utf8(char *restrict dst, const char *restrict src, int buf
   *dst = '\0';
 
   // fprintf(stderr, "maxcells: %d, my_cells; %d\n", *maxcells, my_cells);
+
   *maxcells -= my_cells;
   return my_bytes;        // bytes of text, excluding the NUL
 }
@@ -124,10 +124,10 @@ int escape_str(char *restrict dst, const char *restrict src, int bufsize, int *m
   "????????????????????????????????"
   "????????????????????????????????"
   "????????????????????????????????";
+
 #if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
   static int utf_init=0;
+
   if(utf_init==0){
      /* first call -- check if UTF stuff is usable */
      char *enc = nl_langinfo(CODESET);
@@ -138,7 +138,7 @@ int escape_str(char *restrict dst, const char *restrict src, int bufsize, int *m
      return escape_str_utf8(dst, src, bufsize, maxcells);
   }
 #endif
-       
+
   if(bufsize > *maxcells+1) bufsize=*maxcells+1; // FIXME: assumes 8-bit locale
 
   for(;;){
@@ -152,7 +152,7 @@ int escape_str(char *restrict dst, const char *restrict src, int bufsize, int *m
     *(dst++) = c;
   }
   *dst = '\0';
+
   *maxcells -= my_cells;
   return my_bytes;        // bytes of text, excluding the NUL
 }
index 5d78a4bf6eb80d161b0fce27aba887adda803dc2..444b79cc4e8ff6d9dc7f97aa2813d0479782bf50 100644 (file)
@@ -146,7 +146,7 @@ static int parse_slabinfo20(struct slab_info **list, struct slab_stat *stats,
 
                if (buffer[0] == '#')
                        continue;
-       
+
                curr = get_slabnode();
                if (!curr)
                        break;
index 454969d648951d8c0d6f9067f223b6f3fce16ec5..1f9b1fb696ade715d0863f85d9b648b6bee77b6f 100644 (file)
@@ -312,7 +312,7 @@ void eight_cpu_numbers(double *restrict uret, double *restrict nret, double *res
     new_y = 0;
     tmp_z = 0.0;
     new_z = 0;
+
     FILE_TO_BUF(STAT_FILE,stat_fd);
     sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", &new_u, &new_n, &new_s, &new_i, &new_w, &new_x, &new_y, &new_z);
     ticks_past = (new_u+new_n+new_s+new_i+new_w+new_x+new_y+new_z)-(old_u+old_n+old_s+old_i+old_w+old_x+old_y+old_z);
@@ -360,7 +360,7 @@ void eight_cpu_numbers(double *restrict uret, double *restrict nret, double *res
 void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) {
     double avg_1=0, avg_5=0, avg_15=0;
     char *savelocale;
+
     FILE_TO_BUF(LOADAVG_FILE,loadavg_fd);
     savelocale = strdup(setlocale(LC_NUMERIC, NULL));
     setlocale(LC_NUMERIC, "C");
index 7ba4661af2cf05843b09d011fd3dbad57899583b..e57cafe9eb64eda5b41291cde727e48dc87b4f78 100644 (file)
@@ -45,7 +45,7 @@ void init_Linux_version(void) {
 
 #ifdef __linux__
     static struct utsname uts;
+
     if (uname(&uts) == -1)     /* failure implies impending death */
        exit(1);
 
@@ -66,7 +66,7 @@ void init_Linux_version(void) {
     fclose(fp);
     version_string_depth = sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z);
 #endif /* __linux__ */
-       
+
     if ((version_string_depth < 2) ||           /* Non-standard for all known kernels */
        ((version_string_depth < 3) && (x < 3))) /* Non-standard for 2.x.x kernels */
 #ifdef __linux__
index ebdae8d44bdc6ab26ef4bdf8db3b15dfc8cb61e9..dc89c4d162a9236777ef9b4ae7a93eab33f1a0b5 100644 (file)
--- a/slabtop.c
+++ b/slabtop.c
@@ -90,7 +90,7 @@ static struct slab_info *slabsort(struct slab_info *list)
                list = list->next;
                b = b->next->next;
        }
-       
+
        b = list->next;
        list->next = NULL;
 
diff --git a/tload.c b/tload.c
index a5fe14a07b0a80f6c9485a39aa704e73e9a1340d..27c0aefea0a86fbe14e71f87846c09751aff8cd5 100644 (file)
--- a/tload.c
+++ b/tload.c
@@ -113,7 +113,6 @@ int main(int argc, char **argv)
                {"version", no_argument, NULL, 'V'},
                {NULL, 0, NULL, 0}
        };
 #ifdef HAVE_PROGRAM_INVOCATION_NAME
        program_invocation_name = program_invocation_short_name;
 #endif
diff --git a/w.c b/w.c
index a73f3282f6eaa9462c3d81dbda17f6f86a1ebed3..fee9308ca3418d501ecc3f83a87d0a6b79b9f6f8 100644 (file)
--- a/w.c
+++ b/w.c
@@ -142,12 +142,12 @@ static void print_display_or_interface(const char *restrict host, int len, int r
                                fputc('-', stdout);
                        }
                } else { /* multiple colons found - it's an IPv6 address */
-       
+
                        /* search for % (interface separator in case of IPv6 link address) */
                        while ( (tmp < (host + len)) && (*tmp != '%') && isprint(*tmp) ) tmp++;
 
                        if (*tmp == '%') { /* interface separator found */
-       
+
                                /* number of chars till the end of the input field */
                                len -= (tmp - host);