Re: d80211: clean up some list and loop code

2006-11-16 Thread Dave Dillow
On Thu, 2006-11-16 at 18:25 -0500, John W. Linville wrote: > On Fri, Nov 17, 2006 at 12:04:29AM +0100, Johannes Berg wrote: > > Remove things like "for (;;)" or "for (; condition ;)". > > Ever heard of while loops? > > > --- wireless-dev.orig/net/d80211/sta_info.c 2006-11-16 23:40:48.164935990 >

Re: d80211: clean up some list and loop code

2006-11-16 Thread John W. Linville
On Thu, Nov 16, 2006 at 07:00:02PM -0500, John W. Linville wrote: > No need to resend. Any other opinions on this? I suppose it is just > a beached discussion... What the heck was I typing? "a bikeshed discussion" -- John W. Linville [EMAIL PROTECTED] - To unsubscribe from this list: send th

Re: d80211: clean up some list and loop code

2006-11-16 Thread John W. Linville
On Fri, Nov 17, 2006 at 12:37:40AM +0100, Johannes Berg wrote: > > FWIW, I think I prefer the "for (;;)" version for endless loops. > > It looks more intentional to me. Some grep'ing showed nearly equal > > usage of "for (;;)" versus "while (1)". Is there any "official" > > preference? I don't

Re: d80211: clean up some list and loop code

2006-11-16 Thread Johannes Berg
On Thu, 2006-11-16 at 15:40 -0800, Jouni Malinen wrote: > Isn't "for (;;)" the standard way of doing infinite loops? Please don't > change that. In *BSD it is apparently mandated, but Linux doesn't seem to do that as John pointed out. Personally, I find while (1) much easier to read but really, t

Re: d80211: clean up some list and loop code

2006-11-16 Thread Jouni Malinen
On Fri, Nov 17, 2006 at 12:04:29AM +0100, Johannes Berg wrote: > Remove things like "for (;;)" or "for (; condition ;)". > Ever heard of while loops? Isn't "for (;;)" the standard way of doing infinite loops? Please don't change that. Changing loops to use list_for_each*() is of course welcome. -

Re: d80211: clean up some list and loop code

2006-11-16 Thread Johannes Berg
> > Ever heard of while loops? was more about > "for (; condition ;)". :) > FWIW, I think I prefer the "for (;;)" version for endless loops. > It looks more intentional to me. Some grep'ing showed nearly equal > usage of "for (;;)" versus "while (1)". Is there any "official" > preference?

Re: d80211: clean up some list and loop code

2006-11-16 Thread John W. Linville
On Fri, Nov 17, 2006 at 12:04:29AM +0100, Johannes Berg wrote: > Remove things like "for (;;)" or "for (; condition ;)". > Ever heard of while loops? > --- wireless-dev.orig/net/d80211/sta_info.c 2006-11-16 23:40:48.164935990 > +0100 > +++ wireless-dev/net/d80211/sta_info.c2006-11-16 23