From 3aeea86c1adde5caa7bf18f5054b5acbf359546e Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Mon, 28 Jul 2014 15:04:24 +0200 Subject: [PATCH] zfs_arc: pass reference in llist instead of value This avoids using a void pointer, which size depends on the architecture. Thanks to @dothebart for pointing this out! --- src/zfs_arc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zfs_arc.c b/src/zfs_arc.c index e32e829d..168d566b 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -53,7 +53,7 @@ static long long get_zfs_value(kstat_t *zfs_stats __attribute__((unused)), return (-1); } - return ((long long int)e->value); + return (*(long long int*)e->value); } #elif !defined(__FreeBSD__) // Solaris @@ -222,7 +222,7 @@ static int za_read (void) { llvalues[i] = atoll (fields[2]); - e = llentry_create (fields[0], (void *)llvalues[i]); + e = llentry_create (fields[0], &llvalues[i]); if (e == NULL) { ERROR ("zfs_arc plugin: `llentry_create' failed."); -- 2.30.2