ctf-writer: avoid using NULL pointer in BT_CTF_TO_COMMON
[babeltrace.git] / src / ctf-writer / utils.h
index c344bcbedc62bbee90c4aab392e3c4e8e10ab090..1ea5406a67c4e7058383060967de9af08397b30e 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "field-path.h"
 
-#define BT_CTF_TO_COMMON(_obj)         (&(_obj)->common)
+#define BT_CTF_TO_COMMON(_obj)         ((typeof(&_obj->common)) _obj)
 #define BT_CTF_FROM_COMMON(_obj)       ((void *) _obj)
 
 struct bt_ctf_search_query {
This page took 0.023846 seconds and 4 git commands to generate.