projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
545c137
)
zfs_arc: pass reference in llist instead of value
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!
src/zfs_arc.c
patch
|
blob
|
history
diff --git
a/src/zfs_arc.c
b/src/zfs_arc.c
index
e32e829
..
168d566
100644
(file)
--- 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.");