From 283707c5e5bc436b78ea23bf5500cb6b16a01148 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:27 +0200 Subject: Imported Upstream version 0.9 --- SwapMeter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'SwapMeter.c') diff --git a/SwapMeter.c b/SwapMeter.c index a3ee027..ecbd129 100644 --- a/SwapMeter.c +++ b/SwapMeter.c @@ -1,6 +1,6 @@ /* htop -(C) 2004-2006 Hisham H. Muhammad +(C) 2004-2010 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ @@ -34,8 +34,7 @@ static void SwapMeter_display(Object* cast, RichString* out) { char buffer[50]; Meter* this = (Meter*)cast; long int swap = (long int) this->values[0]; - RichString_init(out); - RichString_append(out, CRT_colors[METER_TEXT], ":"); + RichString_write(out, CRT_colors[METER_TEXT], ":"); sprintf(buffer, "%ldM ", (long int) this->total / 1024); RichString_append(out, CRT_colors[METER_VALUE], buffer); sprintf(buffer, "%ldk", swap); -- cgit v1.2.3