summaryrefslogtreecommitdiffstats
path: root/pcp/PCPDynamicMeter.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-23 12:22:02 +0100
committerBenBE <BenBE@geshi.org>2023-12-26 15:14:19 +0100
commit6aa9ef2726e42c4ae062b55be4d5cc015767d997 (patch)
treed5bd033946b404fa99b70b0b1c560725cef302bf /pcp/PCPDynamicMeter.c
parenta98fc47ffe67e88b1a83f94382795b8787a9bfe8 (diff)
Fix code style
Diffstat (limited to 'pcp/PCPDynamicMeter.c')
-rw-r--r--pcp/PCPDynamicMeter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pcp/PCPDynamicMeter.c b/pcp/PCPDynamicMeter.c
index 1e118351..11df5f0a 100644
--- a/pcp/PCPDynamicMeter.c
+++ b/pcp/PCPDynamicMeter.c
@@ -382,9 +382,11 @@ void PCPDynamicMeter_updateValues(PCPDynamicMeter* this, Meter* meter) {
default:
break;
}
+
if (saved != bytes && metric->suffix)
bytes += xSnprintf(buffer + bytes, size - bytes, "%s", metric->suffix);
}
+
if (!bytes)
xSnprintf(buffer, size, "no data");
}
@@ -458,12 +460,14 @@ void PCPDynamicMeter_display(PCPDynamicMeter* this, ATTR_UNUSED const Meter* met
default:
break;
}
+
if (len) {
RichString_appendnAscii(out, CRT_colors[metric->color], buffer, len);
if (metric->suffix)
RichString_appendAscii(out, CRT_colors[METER_TEXT], metric->suffix);
}
}
+
if (nodata)
RichString_writeAscii(out, CRT_colors[METER_VALUE_ERROR], "no data");
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy