svn commit: r334941 - head/usr.bin/top
Mark Millard
marklmi at yahoo.com
Mon Jun 11 05:59:00 UTC 2018
Eitan Adler eadler at FreeBSD.org wrote on
Mon Jun 11 05:05:22 UTC 2018 :
. . .
> - * positive numbers. If val <= 0 then digits(val) == 0.
> + * non-negative numbers. If val <= 0 then digits(val) == 0.
> */
>
> -int
> +int __pure2
> digits(int val)
> {
> int cnt = 0;
> + if (val == 0) {
> + return 1;
> + }
. . .
The code has digits(0) == 1 but the comment says digits(0) == 0
still.
(The indentation was odd in how it showed in the
web browser before I copied/pasted it above.)
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the svn-src-head
mailing list