summaryrefslogtreecommitdiffstats
path: root/SwapMeter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-08 16:36:00 +0100
committerChristian Göttsche <cgzones@googlemail.com>2020-12-08 16:36:00 +0100
commit5506925b346b09f8556ce2c8f83fe3d69dc1c03c (patch)
tree57f788f12566d3223deef820dc78ae485f99c6cb /SwapMeter.c
parentc6d9fa279b1ace57d52a25ae770fea22afc715e7 (diff)
Use sizeof buffer instead of magic number
Diffstat (limited to 'SwapMeter.c')
-rw-r--r--SwapMeter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SwapMeter.c b/SwapMeter.c
index 8e39c752..fcc11c54 100644
--- a/SwapMeter.c
+++ b/SwapMeter.c
@@ -33,9 +33,9 @@ static void SwapMeter_display(const Object* cast, RichString* out) {
char buffer[50];
const Meter* this = (const Meter*)cast;
RichString_write(out, CRT_colors[METER_TEXT], ":");
- Meter_humanUnit(buffer, this->total, 50);
+ Meter_humanUnit(buffer, this->total, sizeof(buffer));
RichString_append(out, CRT_colors[METER_VALUE], buffer);
- Meter_humanUnit(buffer, this->values[0], 50);
+ Meter_humanUnit(buffer, this->values[0], sizeof(buffer));
RichString_append(out, CRT_colors[METER_TEXT], " used:");
RichString_append(out, CRT_colors[METER_VALUE], buffer);
}

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