[ovs-dev] [PATCH] lib: Use proper type cast to poison lists.

Joe Stringer joe at ovn.org
Tue Dec 15 06:30:11 UTC 2015


'struct ovs_list' comprises of two pointers to 'struct ovs_list'.
Use these in the cast rather than void*.

VMware-BZ: #1571356
Signed-off-by: Joe Stringer <joe at ovn.org>
---
 lib/list.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/list.h b/lib/list.h
index db4a61365cf8..f9c9d850717e 100644
--- a/lib/list.h
+++ b/lib/list.h
@@ -26,8 +26,8 @@
 /* "struct ovs_list" with pointers that will (probably) cause segfaults if
  * dereferenced and, better yet, show up clearly in a debugger. */
 #define OVS_LIST_POISON \
-    (struct ovs_list) { (void *) (uintptr_t) 0xccccccccccccccccULL, \
-                        (void *) (uintptr_t) 0xccccccccccccccccULL }
+(struct ovs_list) { (struct ovs_list *) (uintptr_t) 0xccccccccccccccccULL, \
+                    (struct ovs_list *) (uintptr_t) 0xccccccccccccccccULL }
 
 static inline void list_init(struct ovs_list *);
 static inline void list_poison(struct ovs_list *);
-- 
2.1.4




More information about the dev mailing list