tcon: avoid error 'expected `void *` but argument is of type `const void *`' in tcon_...
authorCody P Schafer <dev@codyps.com>
Tue, 31 May 2016 19:30:40 +0000 (15:30 -0400)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 2 Jun 2016 01:58:35 +0000 (11:28 +0930)
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>
ccan/tcon/tcon.h

index 1dbadafc9726716e6d19d82794ab22b461ef4903..247a7331c8b98aa52c7da44750b6db0c02c6c872 100644 (file)
                canary, tcon_container_of_((member_ptr),                \
                                           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;
 }