From 2d231d77ca2e36147a91fa061924fb0ea880b90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 8 Dec 2020 22:37:15 +0100 Subject: [PATCH] Process: simplify --- Process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Process.c b/Process.c index 170e1486..544358ee 100644 --- a/Process.c +++ b/Process.c @@ -448,7 +448,7 @@ void Process_init(Process* this, const struct Settings_* settings) { } void Process_toggleTag(Process* this) { - this->tag = this->tag == true ? false : true; + this->tag = !this->tag; } bool Process_isNew(const Process* this) { @@ -488,7 +488,8 @@ bool Process_sendSignal(Process* this, Arg sgn) { long Process_pidCompare(const void* v1, const void* v2) { const Process* p1 = (const Process*)v1; const Process* p2 = (const Process*)v2; - return (p1->pid - p2->pid); + + return SPACESHIP_NUMBER(p1->pid, p2->pid); } long Process_compare(const void* v1, const void* v2) {