From: Florian Forster Date: Fri, 25 Jan 2013 07:47:15 +0000 (+0100) Subject: logfile plugin: Make "do_close" a boolean. X-Git-Tag: collectd-4.10.9~17 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=19b6d2624456ca0792c40aa46cc1774f9ad42443;p=collectd.git logfile plugin: Make "do_close" a boolean. --- diff --git a/src/logfile.c b/src/logfile.c index e063dd08..e13c09e7 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -95,7 +95,7 @@ static int logfile_config (const char *key, const char *value) static void logfile_print (const char *msg, int severity, time_t timestamp_time) { FILE *fh; - int do_close = 0; + _Bool do_close = 0; struct tm timestamp_tm; char timestamp_str[64]; char level_str[16] = ""; @@ -164,7 +164,7 @@ static void logfile_print (const char *msg, int severity, time_t timestamp_time) else fprintf (fh, "%s%s\n", level_str, msg); - if (do_close != 0) { + if (do_close) { fclose (fh); } else { fflush(fh);