]> granicus.if.org Git - procps-ng/commitdiff
library: just eliminate a couple of unnecessary braces
authorJim Warner <james.warner@comcast.net>
Sun, 22 Aug 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Tue, 24 Aug 2021 10:52:10 +0000 (20:52 +1000)
Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/readproc.c

index 49a798c5fe3a8647653c0c9b757d520ca64e9472..fc66d0cfd3702c75809f6cf6466408fcddb73958 100644 (file)
@@ -624,9 +624,8 @@ ENTER(0x160);
        &P->blkio_tics, &P->gtime, &P->cgtime
     );
 
-    if(!P->nlwp){
+    if(!P->nlwp)
       P->nlwp = 1;
-    }
 
     return 0;
 LEAVE(0x160);
@@ -1171,9 +1170,8 @@ static proc_t *simple_readproc(PROCTAB *restrict const PT, proc_t *restrict cons
     }
 
     // if multithreaded, some values are crap
-    if(p->nlwp > 1){
+    if(p->nlwp > 1)
       p->wchan = ~0ul;
-    }
 
     /* some number->text resolving which is time consuming */
     /* ( names are cached, so memcpy to arrays was silly ) */
@@ -1422,9 +1420,8 @@ static int listed_nextpid (PROCTAB *PT, proc_t *p) {
 
     if (file2str(path, "status", &ub) != -1) {
       char *str = strstr(ub.buf, "Tgid:");
-      if (str) {
+      if (str)
         p->tgid = atoi(str + 5);   // this tgid is the proper one |
-      }
     }
   }
   return pid;