projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0af747d
)
Varnish plugin: more concise formatting of plugin instance.
author
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 22 Jun 2010 09:10:56 +0000
(11:10 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 22 Jun 2010 09:10:56 +0000
(11:10 +0200)
src/varnish.c
patch
|
blob
|
history
diff --git
a/src/varnish.c
b/src/varnish.c
index
2325312
..
df36cd1
100644
(file)
--- a/
src/varnish.c
+++ b/
src/varnish.c
@@
-167,10
+167,8
@@
static int varnish_submit (const char *plugin_instance, /* {{{ */
if (plugin_instance == NULL)
plugin_instance = "default";
- sstrncpy (vl.plugin_instance, plugin_instance,
- sizeof (vl.plugin_instance));
- strncat(vl.plugin_instance, "-", 1);
- strncat(vl.plugin_instance, category, sizeof(category));
+ ssnprintf(vl.plugin_instance, sizeof (vl.plugin_instance),
+ "%s-%s", plugin_instance, category);
sstrncpy(vl.type, type, sizeof(vl.type));