lkml.org 
[lkml]   [2001]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[OT] style-curiosity

On 03.02 Tigran Aivazian wrote:
> + c = misc_list.next;
> + while (c != &misc_list) {
> + if (c->minor == misc->minor) {
> + up(&misc_sem);
> + return -EBUSY;
> + }
> c = c->next;
> - if (c == &misc_list) {
> - up(&misc_sem);
> - return -EBUSY;
> }

Just a matter of style and curiosity.

Would you kernel programmers consider this 'bad C' (I usually see this
much more clear...)

for (c = misc_list.next; c != &misc_list; c = c->next)
{
if (c->minor == misc->minor) {
up(&misc_sem);
return -EBUSY;
}
}

Has any effect on output assembly ?

--
J.A. Magallon $> cd pub
mailto:jamagallon@able.es $> more beer

Linux werewolf 2.4.2-ac7 #1 SMP Fri Mar 2 02:36:23 CET 2001 i686

-
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:29    [W:0.038 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site