summaryrefslogtreecommitdiff
path: root/components/netspeeds.c
diff options
context:
space:
mode:
authordrkhsh <me@drkhsh.at>2022-10-28 00:21:02 +0200
committerRafael Marçalo <raroma09@gmail.com>2022-10-28 22:22:34 +0100
commit7f00bf6b0b85d23818d6481f771073d82f1dd704 (patch)
tree8fdef928ebab89ed646b18ca41980ea92d966263 /components/netspeeds.c
parent0dfc423e83ea7e609ab63122d8a1e5b3ceed41b5 (diff)
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/
Diffstat (limited to 'components/netspeeds.c')
-rw-r--r--components/netspeeds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/netspeeds.c b/components/netspeeds.c
index 18aa097..e61d982 100644
--- a/components/netspeeds.c
+++ b/components/netspeeds.c
@@ -75,7 +75,7 @@
oldrxbytes = rxbytes;
- if (getifaddrs(&ifal) == -1) {
+ if (getifaddrs(&ifal) < 0) {
warn("getifaddrs failed");
return NULL;
}
@@ -111,7 +111,7 @@
oldtxbytes = txbytes;
- if (getifaddrs(&ifal) == -1) {
+ if (getifaddrs(&ifal) < 0) {
warn("getifaddrs failed");
return NULL;
}