From: Vladimír Čunát Date: Wed, 14 Dec 2016 13:20:07 +0000 (+0100) Subject: lru_create: cast on a better place X-Git-Tag: v1.2.0-rc1~58^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00d8d7676755ee8d1edb4cdeedd6506908ae15a1;p=thirdparty%2Fknot-resolver.git lru_create: cast on a better place ... fixing a warning. The addresses are the same, but it wasn't completely correct. --- diff --git a/lib/generic/lru.h b/lib/generic/lru.h index e632b61d0..b153e6fe0 100644 --- a/lib/generic/lru.h +++ b/lib/generic/lru.h @@ -96,7 +96,7 @@ */ #define lru_create(ptable, max_slots, mm_ctx_array, mm_ctx) do { \ (void)(((__typeof__((*(ptable))->pdata_t))0) == (void *)0); /* typecheck lru_t */ \ - *((struct lru **)(ptable)) = \ + *(ptable) = (__typeof__(*(ptable))) \ lru_create_impl((max_slots), (mm_ctx_array), (mm_ctx)); \ } while (false)