Merge tag 'upstream/1.2.0'
[psensor-pkg-debian.git] / src / lib / plog.c
index 21427a9..2b6ffd1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2014 jeanfi@gmail.com
+ * Copyright (C) 2010-2016 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -43,10 +43,10 @@ void log_open(const char *path)
                log_printf(LOG_ERR, _("Cannot open log file: %s"), path);
 }
 
-void log_close()
+void log_close(void)
 {
        if (!file)
-               return ;
+               return;
 
        fclose(file);
 
@@ -62,7 +62,7 @@ static void vlogf(int lvl, const char *fct, const char *fmt, va_list ap)
        FILE *stdf;
 
        if (lvl > LOG_INFO && (!file || lvl > log_level))
-               return ;
+               return;
 
        vsnprintf(buffer, LOG_BUFFER, fmt, ap);
        buffer[LOG_BUFFER] = '\0';
@@ -86,7 +86,7 @@ static void vlogf(int lvl, const char *fct, const char *fmt, va_list ap)
 
        t = get_current_ISO8601_time();
        if (!t)
-               return ;
+               return;
 
        if (file && lvl <= log_level) {
                if (fct)
@@ -129,7 +129,7 @@ void log_debug(const char *fmt, ...)
        va_list ap;
 
        if (log_level < LOG_DEBUG)
-               return ;
+               return;
 
        va_start(ap, fmt);
        vlogf(LOG_DEBUG, NULL, fmt, ap);