]> git.proxmox.com Git - qemu.git/commitdiff
Properly escape QDECREF macro arguments
authorAnthony Liguori <aliguori@us.ibm.com>
Wed, 11 Nov 2009 16:50:36 +0000 (10:50 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 17 Nov 2009 14:49:38 +0000 (08:49 -0600)
QDECREF does not properly escape the macro arguments which can lead to
unexpected syntax errors.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qobject.h

index 4cc928770db2ee529edb11afb6037792c2e8479c..76f669f95d2667e0f7694cedc307ab595a2349ca 100644 (file)
--- a/qobject.h
+++ b/qobject.h
@@ -60,7 +60,7 @@ typedef struct QObject {
     QObject base
 
 /* Get the 'base' part of an object */
-#define QOBJECT(obj) (&obj->base)
+#define QOBJECT(obj) (&(obj)->base)
 
 /* High-level interface for qobject_incref() */
 #define QINCREF(obj)      \