Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2018 22:48:45 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Eitan Adler <eadler@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r334941 - head/usr.bin/top
Message-ID:  <28144794-1F92-4F0F-8D8C-A5AB7BA75CE2@yahoo.com>

next in thread | raw e-mail | index | archive | help
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)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28144794-1F92-4F0F-8D8C-A5AB7BA75CE2>