aboutsummaryrefslogtreecommitdiff
path: root/procps/powertop.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-09-06 12:53:14 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2013-09-06 12:53:14 +0200
commita407cf74cc43c3cc26168e259cee469a4787a76c (patch)
tree2306029e1ea7b957825b55e3728d23c886da58dd /procps/powertop.c
parentd6ae4fb446daedfe3073d67be655942e9fa7eb18 (diff)
downloadbusybox-w32-a407cf74cc43c3cc26168e259cee469a4787a76c.tar.gz
busybox-w32-a407cf74cc43c3cc26168e259cee469a4787a76c.tar.bz2
busybox-w32-a407cf74cc43c3cc26168e259cee469a4787a76c.zip
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 <vda.linux@googlemail.com>
Diffstat (limited to 'procps/powertop.c')
-rw-r--r--procps/powertop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/procps/powertop.c b/procps/powertop.c
index 71988a295..e3c29d1c3 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -627,7 +627,6 @@ static void show_timerstats(void)
627 int i, n = 0; 627 int i, n = 0;
628 char strbuf6[6]; 628 char strbuf6[6];
629 629
630 strbuf6[5] = '\0';
631 puts("\nTop causes for wakeups:"); 630 puts("\nTop causes for wakeups:");
632 for (i = 0; i < G.lines_cnt; i++) { 631 for (i = 0; i < G.lines_cnt; i++) {
633 if ((G.lines[i].count > 0 /*|| G.lines[i].disk_count > 0*/) 632 if ((G.lines[i].count > 0 /*|| G.lines[i].disk_count > 0*/)
@@ -639,7 +638,7 @@ static void show_timerstats(void)
639 /*char c = ' '; 638 /*char c = ' ';
640 if (G.lines[i].disk_count) 639 if (G.lines[i].disk_count)
641 c = 'D';*/ 640 c = 'D';*/
642 smart_ulltoa5(G.lines[i].count, strbuf6, " KMGTPEZY"); 641 smart_ulltoa5(G.lines[i].count, strbuf6, " KMGTPEZY")[0] = '\0';
643 printf(/*" %5.1f%% (%s)%c %s\n"*/ 642 printf(/*" %5.1f%% (%s)%c %s\n"*/
644 " %5.1f%% (%s) %s\n", 643 " %5.1f%% (%s) %s\n",
645 G.lines[i].count * 100.0 / G.lines_cumulative_count, 644 G.lines[i].count * 100.0 / G.lines_cumulative_count,