From a407cf74cc43c3cc26168e259cee469a4787a76c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 6 Sep 2013 12:53:14 +0200 Subject: Make smart_ulltoa return pointer to end (allows for code shink in callers) function old new delta smart_ulltoa5 405 408 +3 smart_ulltoa4 273 276 +3 list_table 1113 1114 +1 scale 36 34 -2 put_lu 55 53 -2 ulltoa6_and_space 19 14 -5 powertop_main 1470 1461 -9 Signed-off-by: Denys Vlasenko --- procps/nmeter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'procps/nmeter.c') diff --git a/procps/nmeter.c b/procps/nmeter.c index 6a3b32743..5d5b83b8d 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c @@ -333,8 +333,7 @@ static void scale(ullong ul) char buf[5]; /* see http://en.wikipedia.org/wiki/Tera */ - smart_ulltoa4(ul, buf, " kmgtpezy"); - buf[4] = '\0'; + smart_ulltoa4(ul, buf, " kmgtpezy")[0] = '\0'; put(buf); } -- cgit v1.2.3