From: albert <> Date: Fri, 18 Oct 2002 21:40:19 +0000 (+0000) Subject: repair cowboy coding damage X-Git-Tag: v3.3.0~400 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1143a1bd010232043b9cf23179771e9179b2e9c9;p=procps-ng repair cowboy coding damage --- diff --git a/top.c b/top.c index 65b915de..2d386c8b 100644 --- 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;