spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 64c48779dc5f4379409c3b6334e8911986663f61
parent 54051f89a96e8bd68c71e56edffbdac50a62df8e
Author: sin <sin@2f30.org>
Date:   Sat, 16 Sep 2017 19:18:43 +0100

Rename label to something more generic

Diffstat:
Mnetspeed.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/netspeed.c b/netspeed.c @@ -98,28 +98,28 @@ netspeedread(void *arg, char *buf, size_t len) (void)snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/rx_bytes", ifname); 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_bytes", ifname); 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; }