Add standard include early or _FILE_OFFSET_BITS will have definition mismatches on...
[collectd.git] / src / daemon / globals.c
index 9b0aec7..5409294 100644 (file)
@@ -21,7 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  **/
 
-#include "common.h"
+#include "utils/common/common.h"
 #include "globals.h"
 
 #if HAVE_KSTAT_H
  */
 char *hostname_g;
 cdtime_t interval_g;
-int  timeout_g;
+int timeout_g;
 #if HAVE_KSTAT_H
 kstat_ctl_t *kc;
 #endif
 
 void hostname_set(char const *hostname) {
-    char *h = strdup(hostname);
-      if (h == NULL)
-            return;
+  char *h = strdup(hostname);
+  if (h == NULL)
+    return;
 
-        free(hostname_g);
-          hostname_g = h;
+  sfree(hostname_g);
+  hostname_g = h;
 }
-