From 1f3624e551c233c72121e4bf868c849f74e58058 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 22 Jun 2010 11:10:56 +0200 Subject: [PATCH] Varnish plugin: more concise formatting of plugin instance. --- src/varnish.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/varnish.c b/src/varnish.c index 23253127..df36cd1f 100644 --- 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)); -- 2.11.0