projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SNMP Agent plugin:
[collectd.git]
/
src
/
daemon
/
globals.c
diff --git
a/src/daemon/globals.c
b/src/daemon/globals.c
index
2222a5c
..
5c6749f
100644
(file)
--- a/
src/daemon/globals.c
+++ b/
src/daemon/globals.c
@@
-28,22
+28,21
@@
#include <kstat.h>
#endif
#include <kstat.h>
#endif
-void hostname_set(char const *hostname) {
- char *h = strdup(hostname);
- if (h == NULL)
- return;
-
- free(hostname_g);
- hostname_g = h;
-}
-
/*
* Global variables
*/
char *hostname_g;
cdtime_t interval_g;
/*
* Global variables
*/
char *hostname_g;
cdtime_t interval_g;
-int
timeout_g;
+int timeout_g;
#if HAVE_KSTAT_H
kstat_ctl_t *kc;
#endif
#if HAVE_KSTAT_H
kstat_ctl_t *kc;
#endif
+void hostname_set(char const *hostname) {
+ char *h = strdup(hostname);
+ if (h == NULL)
+ return;
+
+ sfree(hostname_g);
+ hostname_g = h;
+}