diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2012-07-18 23:40:18 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-30 16:22:59 +1000 |
commit | e78e51359fd22b69e646167bc9d3f9b28a5c755f (patch) | |
tree | 91f078e3b608f9e69ed1bb7e2a80a2690e544989 | |
parent | ed8d50ba3a6f837d213ed7c39c2b63d33fc75a38 (diff) | |
download | xorg-lib-libXext-e78e51359fd22b69e646167bc9d3f9b28a5c755f.tar.gz |
Avoid having macros expand code to be: ((f) ? (f)->m1 : NULL)->m2
From Matthew R. Green <mrg@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/XSync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/XSync.c b/src/XSync.c index df7c435..5775293 100644 --- a/src/XSync.c +++ b/src/XSync.c @@ -107,8 +107,8 @@ static /* const */ SyncVersionInfo supported_versions[] = { }; #define NUM_VERSIONS (sizeof(supported_versions)/sizeof(supported_versions[0])) -#define GET_VERSION(info) ((info) ? (const SyncVersionInfo*)(info)->data : NULL) -#define IS_VERSION_SUPPORTED(info) (!!GET_VERSION(info)) +#define GET_VERSION(info) ((const SyncVersionInfo*)(info)->data) +#define IS_VERSION_SUPPORTED(info) (!!(info)) static const SyncVersionInfo* GetVersionInfo(Display *dpy) |