Browse Source

tcon: avoid error 'expected `void *` but argument is of type `const void *`' in tcon_container_of()

I did not see any failures of other modules with this change, but I'm
not completely certain there are no cases that it breaks.

Signed-off-by: Cody P Schafer <dev@codyps.com>
Cody P Schafer 9 years ago
parent
commit
95573b36fd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/tcon/tcon.h

+ 1 - 1
ccan/tcon/tcon.h

@@ -330,7 +330,7 @@
 		canary, tcon_container_of_((member_ptr),		\
 		canary, tcon_container_of_((member_ptr),		\
 					   tcon_offset((x), canary)))
 					   tcon_offset((x), canary)))
 
 
-static inline void *tcon_container_of_(void *member_ptr, size_t offset)
+static inline void *tcon_container_of_(const void *member_ptr, size_t offset)
 {
 {
 	return member_ptr ? (char *)member_ptr - offset : NULL;
 	return member_ptr ? (char *)member_ptr - offset : NULL;
 }
 }