Linux-wireless: why use macro to call functions
adrian.ratnapala at gmail.com
Tue Dec 24 08:48:33 EST 2013
> So the main (or only?) purpose of the macro is to save
Better to say it saves cutting and pasting, which is a damn good
thing -- even if macros are an old fashioned way of doing it.
> in terms of functionality I could equivalently call each handlers.
But then you would have to call them repeatedly inside a loop and
check for errors in the same way as is done in the macro. Not just
call the function.
On 24 December 2013 13:19, Fred Chou <fred.chou.nd at gmail.com> wrote:
> On Mon, Dec 23, 2013 at 8:03 PM, Bernd Petrovitsch
> <bernd at petrovitsch.priv.at> wrote:
>> And the macro just avoids to copy-paste identical lines/logic.
> Thank you all for the explanation. Originally I was wondering if there could
> be some other reasons. So the main (or only?) purpose of the macro is to
> save some typing, and in terms of functionality I could equivalently call
> each handlers.
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
mobile: +49 1515 277 0000
Rainer Strasse 7
More information about the Kernelnewbies