X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Flib%2Fplog.c;h=2b6ffd11d4f90dfcaa663a38548b5bd767da5c66;hp=21427a96a6e73e969484ed96b31b81bd178384db;hb=bd7036af56a4b61b2b473dccbeac5e26f78b57da;hpb=e248180cc4ebc258fdd5778a26c08287089165b1 diff --git a/src/lib/plog.c b/src/lib/plog.c index 21427a9..2b6ffd1 100644 --- a/src/lib/plog.c +++ b/src/lib/plog.c @@ -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);