Introduction
Introduction Statistics Contact Development Disclaimer Help
tRename label to something more generic - spoon - dwm status utility (2f30 fork)
git clone git://src.adamsgaard.dk/spoon
Log
Files
Refs
LICENSE
---
commit 64c48779dc5f4379409c3b6334e8911986663f61
parent 54051f89a96e8bd68c71e56edffbdac50a62df8e
Author: sin <[email protected]>
Date: Sat, 16 Sep 2017 19:18:43 +0100
Rename label to something more generic
Diffstat:
M netspeed.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/netspeed.c b/netspeed.c
t@@ -98,28 +98,28 @@ netspeedread(void *arg, char *buf, size_t len)
(void)snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/rx_by…
if (!(fp = fopen(path, "r"))) {
warn("fopen %s", path);
- goto closeandfree;
+ goto err;
}
if (fscanf(fp, "%llu", &rxbytes) != 1) {
warn("fscanf %s", path);
- goto closeandfree;
+ goto err;
}
fclose(fp);
(void)snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/tx_by…
if (!(fp = fopen(path, "r"))) {
warn("fopen %s", path);
- goto closeandfree;
+ goto err;
}
if (fscanf(fp, "%llu", &txbytes) != 1) {
warn("fscanf %s", path);
- goto closeandfree;
+ goto err;
}
fclose(fp);
updatenetspeed(buf, len, rxbytes, txbytes);
return 0;
-closeandfree:
+err:
fclose(fp);
return -1;
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.