From cce2e5ecb05cdf68831fbf44c5ab90f4e16364b3 Mon Sep 17 00:00:00 2001 From: drkhsh Date: Fri, 28 Oct 2022 00:21:02 +0200 Subject: radical re-formatting 3/3: Error checks Check for `< 0` instead of `== -1`. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/ --- components/netspeeds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/netspeeds.c') diff --git a/components/netspeeds.c b/components/netspeeds.c index 97e565b..cde6fa9 100644 --- a/components/netspeeds.c +++ b/components/netspeeds.c @@ -71,7 +71,7 @@ oldrxbytes = rxbytes; - if (getifaddrs(&ifal) == -1) { + if (getifaddrs(&ifal) < 0) { warn("getifaddrs failed"); return NULL; } @@ -105,7 +105,7 @@ oldtxbytes = txbytes; - if (getifaddrs(&ifal) == -1) { + if (getifaddrs(&ifal) < 0) { warn("getifaddrs failed"); return NULL; } -- cgit v1.2.3