[OT] style-curiosity

J . A . Magallon (jamagallon@able.es)
Fri, 2 Mar 2001 12:07:12 +0100


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/