lkml.org 
[lkml]   [2003]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] 2.5.59 : drivers/net/fc/iph5526.c
Date
From
Rusty Russell <rusty@rustcorp.com.au> said:

[...]

> > - for (i = 0; i < clone_list[i].vendor_id != 0; i++)

i < clone_list[i].vendor_id != 0 is (i < clone_list[i].vendor_id) != 0 is
just i < clone_list[i].vendor_id, so the for is done for i = 0 and possibly
for 1. Getting this effect (if desired) with an if is a load clearer.

Having i twice in the condition is also highly suspicious... is this code
ever executed? It looks like a bad screwup in the condition that went
unnoticed because it was never hit.
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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