]> granicus.if.org Git - procps-ng/commitdiff
top: and 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>
top/top.c

index d538db5b703e0796c6f7901c7940fd28ae27bd95..f1ea0004f1ada44586de67a12f03302c90f60956 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -1826,9 +1826,9 @@ static void build_headers (void) {
    int i;
 
    // ensure fields not visible incur no significant library costs
-   for (i = 0; i < MAXTBL(Fieldstab); i++) {
+   for (i = 0; i < MAXTBL(Fieldstab); i++)
       Pids_itms[i] = PIDS_extra;
-   }
+
    ckITEM(EU_PID);      // these 2 fields may not display,
    ckITEM(EU_STA);      // yet we'll always need them both
    ckITEM(EU_CMD);      // this is used with 'Y' (inspect)
@@ -2308,9 +2308,9 @@ static void zap_fieldstab (void) {
       Fieldstab[EU_CPN].width = digits;
    }
    digits = (unsigned)snprintf(buf, sizeof(buf), "%u", (unsigned)Numa_node_tot);
-   if (2 < digits) {
+   if (2 < digits)
       Fieldstab[EU_NMA].width = digits;
-   }
+
    // and accommodate optional wider non-scalable columns (maybe)
    if (!AUTOX_MODE) {
       Fieldstab[EU_UED].width = Fieldstab[EU_URD].width
@@ -3733,9 +3733,8 @@ static void configs_reads (void) {
          p_home = NULL;
       }
    }
-   if (p_home) {
+   if (p_home)
       configs_path("%s/.%src", p_home, Myname);
-   }
 
    if (!(fp = fopen(Rc_name, "r"))) {
       p = getenv("XDG_CONFIG_HOME");
@@ -4850,9 +4849,9 @@ static void keys_global (int ch) {
             show_msg(N_txt(NOT_smp_cpus_txt));
          break;
       case 'k':
-         if (Secure_mode) {
+         if (Secure_mode)
             show_msg(N_txt(NOT_onsecure_txt));
-         else {
+         else {
             int sig = SIGTERM,
                 def = PID_VAL(EU_PID, s_int, w->ppt[w->begtask]),
                 pid = get_int(fmtmk(N_txt(GET_pid2kill_fmt), def));