projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f14ab93
)
write_redis: pass a literal string to snprintf()
author
Marc Fournier
<marc.fournier@camptocamp.com>
Mon, 24 Nov 2014 14:00:45 +0000
(15:00 +0100)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Mon, 24 Nov 2014 20:45:06 +0000
(21:45 +0100)
This corrects the following compiler warning when building with
"-Werror=format-security" (the default when building debian packages):
write_redis.c:91:3: error: format not a string literal and no format
arguments
src/write_redis.c
patch
|
blob
|
history
diff --git
a/src/write_redis.c
b/src/write_redis.c
index
b47650d
..
b4c5e21
100644
(file)
--- a/
src/write_redis.c
+++ b/
src/write_redis.c
@@
-88,8
+88,7
@@
static int wr_write (const data_set_t *ds, /* {{{ */
} \
} while (0)
- APPEND (time);
- APPEND (":");
+ APPEND ("%s:", time);
for (i = 0; i < ds->ds_num; i++)
{