mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
pstree: Use max() helper in max_pid assignment
It shrinks code a bit. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
8fc6dbfadd
commit
a2b215a19b
9
pstree.c
9
pstree.c
@@ -141,16 +141,13 @@ int prepare_pstree(void)
|
||||
break;
|
||||
|
||||
pi->pid.virt = e->pid;
|
||||
if (e->pid > max_pid)
|
||||
max_pid = e->pid;
|
||||
max_pid = max((int)e->pid, max_pid);
|
||||
|
||||
pi->pgid = e->pgid;
|
||||
if (e->pgid > max_pid)
|
||||
max_pid = e->pgid;
|
||||
max_pid = max((int)e->pgid, max_pid);
|
||||
|
||||
pi->sid = e->sid;
|
||||
if (e->sid > max_pid)
|
||||
max_pid = e->sid;
|
||||
max_pid = max((int)e->sid, max_pid);
|
||||
|
||||
if (e->ppid == 0) {
|
||||
BUG_ON(root_item);
|
||||
|
Reference in New Issue
Block a user