summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2021-09-21 18:11:10 +0200
committerdzwdz2021-09-21 18:11:10 +0200
commit262311a02c4bcf001d1b2a4ce496a5a83ec4f9e1 (patch)
treee2aee71abbe5aac7b51d8e902a3d154376fae5fd /src/kernel/proc.c
parent2373680d99372b9e7cdecf1c8d4b0a7366eb3cfb (diff)
implement (safe) min/max macros
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 94fc419..13ce759 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -115,8 +115,7 @@ int process_try2collect(struct process *dead) {
dead->state = PS_DEADER;
parent->state = PS_RUNNING;
- len = parent->death_msg.len < dead->death_msg.len
- ? parent->death_msg.len : dead->death_msg.len;
+ len = min(parent->death_msg.len, dead->death_msg.len);
res = virt_cpy(
parent->pages, parent->death_msg.buf,
dead->pages, dead->death_msg.buf, len);