]> granicus.if.org Git - procps-ng/commitdiff
repair cowboy coding damage
authoralbert <>
Fri, 18 Oct 2002 21:40:19 +0000 (21:40 +0000)
committeralbert <>
Fri, 18 Oct 2002 21:40:19 +0000 (21:40 +0000)
top.c

diff --git a/top.c b/top.c
index 65b915de58b83a2b1358d2f9f5f2c93807eea884..2d386c8b733fbd0d60e2e3059543153308d4ce97 100644 (file)
--- a/top.c
+++ b/top.c
@@ -91,7 +91,7 @@ static unsigned Mem_pages;
 static int   Cpu_tot,
             *Cpu_map;
         /* assume no IO-wait stats, overridden if linux 2.5.41 */
-static char *States_fmts = STATES_line2x4;
+static const char *States_fmts = STATES_line2x4;
 
         /* Specific process id monitoring support */
 static pid_t  Monpids [MONPIDMAX] = { 0 };
@@ -738,7 +738,7 @@ static const char *scale_tics (TICS_t tics, const int width)
 
    ct  = ((tics * 100) / Hertz)%100 ;
    nt  = tics / Hertz;
-   if (width >= snprintf(buf, sizeof(buf), T1, nt/60, nt%60, ct)
+   if (width >= snprintf(buf, sizeof(buf), T1, nt/60, nt%60, ct))
          return buf;
    ss  = nt % 60;
    nt  /= 60;