aboutsummaryrefslogtreecommitdiff
path: root/procps/pstree.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-01-16 17:31:05 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2017-01-16 17:31:05 +0100
commit4e08a123b0f8c7d2c66583e84759b0974e791ee9 (patch)
tree3454632cecf1f6a042e6cb705432866cf83f358d /procps/pstree.c
parent936e83e694b3225dbcc14fc99ca8053e2518ab35 (diff)
downloadbusybox-4e08a123b0f8c7d2c66583e84759b0974e791ee9.tar.gz
Assorted warning fixes and added a comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/pstree.c')
-rw-r--r--procps/pstree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/procps/pstree.c b/procps/pstree.c
index c5fb83688..f97e99639 100644
--- a/procps/pstree.c
+++ b/procps/pstree.c
@@ -357,7 +357,9 @@ static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid)
static void mread_proc(void)
{
procps_status_t *p = NULL;
+#if ENABLE_FEATURE_SHOW_THREADS
pid_t parent = 0;
+#endif
int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS;
while ((p = procps_scan(p, flags)) != NULL) {
@@ -368,7 +370,9 @@ static void mread_proc(void)
#endif
{
add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/);
+#if ENABLE_FEATURE_SHOW_THREADS
parent = p->pid;
+#endif
}
}
}