Always quote perfdata labels

This commit is contained in:
Lorenz Kästle 2025-03-30 22:35:29 +02:00
parent f413ac38e3
commit 1921cfccd6

View file

@ -33,7 +33,7 @@ char *pd_value_to_string(const mp_perfdata_value pd) {
char *pd_to_string(mp_perfdata pd) {
assert(pd.label != NULL);
char *result = NULL;
asprintf(&result, "%s=", pd.label);
asprintf(&result, "'%s'=", pd.label);
asprintf(&result, "%s%s", result, pd_value_to_string(pd.value));