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/
This commit is contained in:
drkhsh
2022-10-28 00:21:02 +02:00
parent 3251e91187
commit cce2e5ecb0
4 changed files with 15 additions and 17 deletions

View File

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