Module Name: src Committed By: rillig Date: Fri Jun 14 17:15:45 UTC 2024
Modified Files: src/usr.bin/systat: main.c Log Message: systat: don't compare integer to floating point constants No binary change. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.bin/systat/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/systat/main.c diff -u src/usr.bin/systat/main.c:1.56 src/usr.bin/systat/main.c:1.57 --- src/usr.bin/systat/main.c:1.56 Sat Aug 21 13:22:19 2021 +++ src/usr.bin/systat/main.c Fri Jun 14 17:15:45 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.56 2021/08/21 13:22:19 christos Exp $ */ +/* $NetBSD: main.c,v 1.57 2024/06/14 17:15:45 rillig Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: main.c,v 1.56 2021/08/21 13:22:19 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.57 2024/06/14 17:15:45 rillig Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -237,7 +237,7 @@ main(int argc, char **argv) curmode->c_flags |= CF_INIT; labels(); - dellave = 0.0; + dellave = 0; display(0); if (!bflag) { @@ -291,13 +291,13 @@ display(int signo) if (curmode->c_flags & CF_LOADAV) { j = 5.0*avenrun[0] + 0.5; dellave -= avenrun[0]; - if (dellave >= 0.0) + if (dellave >= 0) c = '<'; else { c = '>'; dellave = -dellave; } - if (dellave < 0.1) + if (dellave < 1) c = '|'; dellave = avenrun[0]; wmove(wload, 0, 0);