projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd-tg: remove dead code
[collectd.git]
/
src
/
interface.c
diff --git
a/src/interface.c
b/src/interface.c
index
90dc139
..
bc2121b
100644
(file)
--- a/
src/interface.c
+++ b/
src/interface.c
@@
-135,7
+135,6
@@
static int interface_config (const char *key, const char *value)
static int interface_init (void)
{
kstat_t *ksp_chain;
static int interface_init (void)
{
kstat_t *ksp_chain;
- derive_t val;
numif = 0;
numif = 0;
@@
-152,7
+151,7
@@
static int interface_init (void)
continue;
if (kstat_read (kc, ksp_chain, NULL) == -1)
continue;
continue;
if (kstat_read (kc, ksp_chain, NULL) == -1)
continue;
- if (
(val = get_kstat_value (ksp_chain, "obytes")
) == -1LL)
+ if (
get_kstat_value (ksp_chain, "obytes"
) == -1LL)
continue;
ksp[numif++] = ksp_chain;
}
continue;
ksp[numif++] = ksp_chain;
}
@@
-368,9
+367,8
@@
static int interface_read (void)
if (pnif != nif || ifstat == NULL)
{
if (pnif != nif || ifstat == NULL)
{
- if (ifstat != NULL)
- free(ifstat);
- ifstat = malloc(nif * sizeof(perfstat_netinterface_t));
+ free(ifstat);
+ ifstat = malloc(nif * sizeof (*ifstat));
}
pnif = nif;
}
pnif = nif;