summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 545c137)
raw | patch | inline | side by side (parent: 545c137)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Mon, 28 Jul 2014 13:04:24 +0000 (15:04 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Mon, 28 Jul 2014 13:04:24 +0000 (15:04 +0200) |
This avoids using a void pointer, which size depends on the
architecture.
Thanks to @dothebart for pointing this out!
architecture.
Thanks to @dothebart for pointing this out!
src/zfs_arc.c | patch | blob | history |
diff --git a/src/zfs_arc.c b/src/zfs_arc.c
index e32e829d5a10b5a6d4a6577dc6bcda7de5323f88..168d566bb47ff406f0deb183c5c9d7550211e969 100644 (file)
--- a/src/zfs_arc.c
+++ b/src/zfs_arc.c
return (-1);
}
- return ((long long int)e->value);
+ return (*(long long int*)e->value);
}
#elif !defined(__FreeBSD__) // Solaris
{
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.");