]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lru_create: cast on a better place
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 14 Dec 2016 13:20:07 +0000 (14:20 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 14 Dec 2016 13:20:45 +0000 (14:20 +0100)
... fixing a warning.  The addresses are the same,
but it wasn't completely correct.

lib/generic/lru.h

index e632b61d01005a572aefd28545397800c9400ffb..b153e6fe0422916e8faa570b90e8374bb9eb7315 100644 (file)
@@ -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)