aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-05-26 18:07:30 +0000
committerEric Andersen <andersen@codepoet.org>2003-05-26 18:07:30 +0000
commitfab3e12cec54854ec1e94ddd500a1b7ed23fb1c3 (patch)
tree371e09bf9422469518de8857b03edf74db5a6873 /libbb/procps.c
parent64191c38961a5a0812b6922fee6c63e652f74e81 (diff)
downloadbusybox-fab3e12cec54854ec1e94ddd500a1b7ed23fb1c3.tar.gz
Skip printing "/proc/%d/cmdline" stuff when it is not relevant
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index a513f3f7f..7df071869 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -105,8 +105,8 @@ extern procps_status_t * procps_scan(int save_user_arg0)
curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */
- sprintf(status, "/proc/%d/cmdline", pid);
if(save_user_arg0) {
+ sprintf(status, "/proc/%d/cmdline", pid);
if((fp = fopen(status, "r")) == NULL)
continue;
if((n=fread(buf, 1, sizeof(buf)-1, fp)) > 0) {