aboutsummaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-01-02 10:25:11 +0000
committerRon Yorston <rmy@pobox.com>2014-01-02 10:25:11 +0000
commitb8f278ee745778806118f57fb7884d205eba05ad (patch)
treefef237f6dd302c59918cf389a60c120e58d3e086 /procps/ps.c
parent3fd34651ea72ea1c335d3170f234cb0517fd897f (diff)
parent57434022cefde87133b8ad39fb3b79c1274e7684 (diff)
downloadbusybox-w32-b8f278ee745778806118f57fb7884d205eba05ad.tar.gz
busybox-w32-b8f278ee745778806118f57fb7884d205eba05ad.tar.bz2
busybox-w32-b8f278ee745778806118f57fb7884d205eba05ad.zip
Merge branch 'busybox' into merge
Conflicts: archival/Config.src shell/ash.c
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 0dfda2039..32563776d 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -299,8 +299,7 @@ static void put_lu(char *buf, int size, unsigned long u)
299 char buf4[5]; 299 char buf4[5];
300 300
301 /* see http://en.wikipedia.org/wiki/Tera */ 301 /* see http://en.wikipedia.org/wiki/Tera */
302 smart_ulltoa4(u, buf4, " mgtpezy"); 302 smart_ulltoa4(u, buf4, " mgtpezy")[0] = '\0';
303 buf4[4] = '\0';
304 sprintf(buf, "%.*s", size, buf4); 303 sprintf(buf, "%.*s", size, buf4);
305} 304}
306 305
@@ -750,8 +749,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
750#endif 749#endif
751 { 750 {
752 char buf6[6]; 751 char buf6[6];
753 smart_ulltoa5(p->vsz, buf6, " mgtpezy"); 752 smart_ulltoa5(p->vsz, buf6, " mgtpezy")[0] = '\0';
754 buf6[5] = '\0';
755#if ENABLE_FEATURE_PS_LONG 753#if ENABLE_FEATURE_PS_LONG
756 if (opts & OPT_l) { 754 if (opts & OPT_l) {
757 char bufr[6], stime_str[6]; 755 char bufr[6], stime_str[6];
@@ -762,8 +760,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
762 time_t start = now - elapsed; 760 time_t start = now - elapsed;
763 struct tm *tm = localtime(&start); 761 struct tm *tm = localtime(&start);
764 762
765 smart_ulltoa5(p->rss, bufr, " mgtpezy"); 763 smart_ulltoa5(p->rss, bufr, " mgtpezy")[0] = '\0';
766 bufr[5] = '\0';
767 764
768 if (p->tty_major == 136) 765 if (p->tty_major == 136)
769 /* It should be pts/N, not ptsN, but N > 9 766 /* It should be pts/N, not ptsN, but N > 9