2
0
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:
Cyrill Gorcunov
2012-09-17 18:22:13 +04:00
committed by Pavel Emelyanov
parent 8fc6dbfadd
commit a2b215a19b

View File

@@ -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);