lkml.org 
[lkml]   [1999]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2.10-ac7 compile errors on Alpha
Graffiti wrote:
>
> > void *memchr(const void *s, int c, size_t n)
> > {
> > while (n-- != 0) {
> ^^^^^^^^
>
> Is memchr() guaranteed to be called only with n >= 1?
> Otherwise, wouldn't:
> while (n-- > 0) {
> be a better choice?

The '--' following the 'n' implies that n is decremented after the
current statement is evaluated. So if n == 0, you are still ok.

Jeff




--
He's pretty fly for a rabbi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.192 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site