Linux-wireless: why use macro to call functions
Bernd Petrovitsch
bernd at petrovitsch.priv.at
Mon Dec 23 07:03:00 EST 2013
Hi!
On Mon, 2013-12-23 at 11:23 +0100, Martin Brugnara wrote:
[...]
> Why here is used a macro instead of an inline func.
Maybe you should get a book to learn "C"?
The macro uses "goto" which won't work with inline functions in that
situation.
Since the macro uses the only argument exactly once, it actually makes
no functional/semantic difference if it is a macro or would be an inline
function (and performance-wise very probably too with any somewhat
recent compiler).
And the macro just avoids to copy-paste identical lines/logic.
And you surely should learn to quote correctly and thus avoid top
posting completely.
[... fullquote deleted ...]
Bernd
--
Bernd Petrovitsch Email : bernd at petrovitsch.priv.at
LUGA : http://www.luga.at
More information about the Kernelnewbies
mailing list