netdev
[Top] [All Lists]

Re: initial acenic ZC cleanup

To: Jes Sorensen <jes@xxxxxxxxxxxxx>
Subject: Re: initial acenic ZC cleanup
From: Mitchell Blank Jr <mitch@xxxxxxxxxx>
Date: Thu, 8 Mar 2001 13:56:49 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <200103082147.f28LlS301042@xxxxxxxxxxxxxxxxxxxxxxxxx>; from jes@xxxxxxxxxxxxx on Thu, Mar 08, 2001 at 04:47:28PM -0500
References: <200103082147.f28LlS301042@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Jes Sorensen wrote:
> +#define late_stop_netif_stop_queue(dev)              {do{} while(0);}

(Warning: minor nit pick ahead)

What is the point of using the "do{}while(0)" construct and then
surrounding it with braces?  Remember, the entire point of using
the "do { /*...*/ } while(0)" is to make macros safe for parsing in
the case of "if (foo) macro(); else whatver();" since you need something
that will consume the semicolon following the macro call.  But putting
an extra set of braces around it breaks this anyway, making the do/while
pointless.

-Mitch

<Prev in Thread] Current Thread [Next in Thread>