Avoid C preprocessor trick where macro has the same name as a function.
authorBen Pfaff <blp@nicira.com>
Mon, 29 Jul 2013 22:24:45 +0000 (15:24 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 29 Jul 2013 22:24:45 +0000 (15:24 -0700)
commit5453ae2067671c0d40a5b3ac3cb3d4027bed6abb
treef797fc5637955f401f5bee32c578085d31697bdc
parent74cc3969aff34f24c093905c427471ebfb219f0c
Avoid C preprocessor trick where macro has the same name as a function.

In C, one can do preprocessor tricks by making a macro expansion include
the macro's own name.  We actually used this in the tree to automatically
provide function arguments, e.g.:

    int f(int x, const char *file, int line);
    #define f(x) f(x, __FILE__, __LINE__)

...

    f(1);    /* Expands to a call like f(1, __FILE__, __LINE__); */

However it's somewhat confusing, so this commit stops using that trick.

Reported-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ed Maste <emaste@freebsd.org>
lib/jsonrpc.c
lib/latch.c
lib/latch.h
lib/ovs-thread.c
lib/ovs-thread.h
lib/poll-loop.c
lib/poll-loop.h
lib/timer.c
lib/timer.h