Module Name: src
Committed By: njoly
Date: Wed Jul 28 17:39:54 UTC 2010
Modified Files:
src/bin/ps: print.c
Log Message:
Do not check pcpu value against 100.0 but rather 99.95, to properly
deal with value rounding. From a...@.
To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/bin/ps/print.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/ps/print.c
diff -u src/bin/ps/print.c:1.114 src/bin/ps/print.c:1.115
--- src/bin/ps/print.c:1.114 Tue Jul 27 12:40:48 2010
+++ src/bin/ps/print.c Wed Jul 28 17:39:54 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.114 2010/07/27 12:40:48 njoly Exp $ */
+/* $NetBSD: print.c,v 1.115 2010/07/28 17:39:54 njoly Exp $ */
/*
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: print.c,v 1.114 2010/07/27 12:40:48 njoly Exp $");
+__RCSID("$NetBSD: print.c,v 1.115 2010/07/28 17:39:54 njoly Exp $");
#endif
#endif /* not lint */
@@ -1092,7 +1092,7 @@
k = arg;
v = ve->var;
dbl = getpcpu(k);
- doubleprintorsetwidth(v, dbl, (dbl >= 100.0) ? 0 : 1, mode);
+ doubleprintorsetwidth(v, dbl, (dbl >= 99.95) ? 0 : 1, mode);
}
double