diff options
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index aad30068..5dbdb4de 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -521,7 +521,10 @@ char *perfdata (const char *label, { char *data = NULL; - asprintf (&data, "\"%s\"=%ld%s;", label, val, uom); + if (index (label, '"')) + asprintf (&data, "\"%s\"=%ld%s;", label, val, uom); + else + asprintf (&data, "%s=%ld%s;", label, val, uom); if (warnp) asprintf (&data, "%s%ld;", data, warn); |