procps/procps-3.2.8-gcc45.diff

18 lines
879 B
Diff

Index: procps-3.2.8/ps/output.c
===================================================================
--- procps-3.2.8.orig/ps/output.c
+++ procps-3.2.8/ps/output.c
@@ -463,11 +463,11 @@ static int pr_pcpu(char *restrict const
double uptime_secs;
total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
jiffies = jiffies_since_boot - pp->start_time;
if(jiffies) pcpu = (total_time * 1000ULL) / jiffies;
- if (pcpu/10U => 100U) /* do not confuse the user by scale effects */
+ if (pcpu/10U >= 100U) /* do not confuse the user by scale effects */
return snprintf(outbuf, COLWID, "100");
return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U);
}
/* this is a "per-mill" format, like %cpu with no decimal point */
static int pr_cp(char *restrict const outbuf, const proc_t *restrict const pp){