Remove parentheses around return arguments
[collectd.git] / src / logfile.c
index ef3aa97..e5807f1 100644 (file)
@@ -53,7 +53,7 @@ static int logfile_config(const char *key, const char *value) {
     if (log_level < 0) {
       log_level = LOG_INFO;
       ERROR("logfile: invalid loglevel [%s] defaulting to 'info'", value);
-      return (1);
+      return 1;
     }
   } else if (0 == strcasecmp(key, "File")) {
     sfree(log_file);
@@ -78,7 +78,6 @@ static void logfile_print(const char *msg, int severity,
                           cdtime_t timestamp_time) {
   FILE *fh;
   _Bool do_close = 0;
-  struct tm timestamp_tm;
   char timestamp_str[64];
   char level_str[16] = "";
 
@@ -105,8 +104,8 @@ static void logfile_print(const char *msg, int severity,
   }
 
   if (print_timestamp) {
-    time_t tt = CDTIME_T_TO_TIME_T(timestamp_time);
-    localtime_r(&tt, &timestamp_tm);
+    struct tm timestamp_tm;
+    localtime_r(&CDTIME_T_TO_TIME_T(timestamp_time), &timestamp_tm);
 
     strftime(timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S",
              &timestamp_tm);
@@ -195,7 +194,7 @@ static int logfile_notification(const notification_t *n,
 
   logfile_print(buf, LOG_INFO, (n->time != 0) ? n->time : cdtime());
 
-  return (0);
+  return 0;
 } /* int logfile_notification */
 
 void module_register(void) {
@@ -205,5 +204,3 @@ void module_register(void) {
   plugin_register_notification("logfile", logfile_notification,
                                /* user_data = */ NULL);
 } /* void module_register (void) */
-
-/* vim: set sw=4 ts=4 tw=78 noexpandtab : */