Commit a2b215a1 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

pstree: Use max() helper in max_pid assignment

It shrinks code a bit.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8fc6dbfa
...@@ -141,16 +141,13 @@ int prepare_pstree(void) ...@@ -141,16 +141,13 @@ int prepare_pstree(void)
break; break;
pi->pid.virt = e->pid; pi->pid.virt = e->pid;
if (e->pid > max_pid) max_pid = max((int)e->pid, max_pid);
max_pid = e->pid;
pi->pgid = e->pgid; pi->pgid = e->pgid;
if (e->pgid > max_pid) max_pid = max((int)e->pgid, max_pid);
max_pid = e->pgid;
pi->sid = e->sid; pi->sid = e->sid;
if (e->sid > max_pid) max_pid = max((int)e->sid, max_pid);
max_pid = e->sid;
if (e->ppid == 0) { if (e->ppid == 0) {
BUG_ON(root_item); BUG_ON(root_item);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment