projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57c8855
)
logfile plugin: Make "do_close" a boolean.
author
Florian Forster
<octo@collectd.org>
Fri, 25 Jan 2013 07:47:15 +0000
(08:47 +0100)
committer
Florian Forster
<octo@collectd.org>
Fri, 25 Jan 2013 07:47:15 +0000
(08:47 +0100)
src/logfile.c
patch
|
blob
|
history
diff --git
a/src/logfile.c
b/src/logfile.c
index
e063dd0
..
e13c09e
100644
(file)
--- 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);