From: Filipe Brandenburger Date: Thu, 2 Aug 2018 23:00:53 +0000 (-0700) Subject: network: Use CMP() macro for comparison. X-Git-Tag: v240~856^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26cdf3e50b7c4e3b7c617771eb64087130ff801b;p=thirdparty%2Fsystemd.git network: Use CMP() macro for comparison. Follow up for PRs #9764 and #9760. --- diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index c8f7c4f98a5..77ba8c678ee 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -36,12 +36,7 @@ static int network_config_compare_func(const void *a, const void *b) { if (r != 0) return r; - if (x->line < y->line) - return -1; - if (x->line > y->line) - return 1; - - return 0; + return CMP(x->line, y->line); } const struct hash_ops network_config_hash_ops = {