URI:
       tNo need for goto - spoon - dwm status utility (2f30 fork)
  HTML git clone git://src.adamsgaard.dk/spoon
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
   DIR commit ec1d812d83bef0d5206975281eea382bcf1f4224
   DIR parent 8daa0a03a61de62d8c8d702763a415b1ab7228ea
  HTML Author: sin <sin@2f30.org>
       Date:   Sat, 16 Sep 2017 19:27:34 +0100
       
       No need for goto
       
       Diffstat:
         M netspeed.c                          |      10 ++++------
       
       1 file changed, 4 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/netspeed.c b/netspeed.c
       t@@ -102,7 +102,8 @@ netspeedread(void *arg, char *buf, size_t len)
                }
                if (fscanf(fp, "%llu", &rxbytes) != 1) {
                        warn("fscanf %s", path);
       -                goto err;
       +                fclose(fp);
       +                return -1;
                }
                fclose(fp);
                (void)snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/tx_bytes", ifname);
       t@@ -112,15 +113,12 @@ netspeedread(void *arg, char *buf, size_t len)
                }
                if (fscanf(fp, "%llu", &txbytes) != 1) {
                        warn("fscanf %s", path);
       -                goto err;
       +                fclose(fp);
       +                return -1;
                }
                fclose(fp);
        
                updatenetspeed(buf, len, rxbytes, txbytes);
                return 0;
       -
       -err:
       -        fclose(fp);
       -        return -1;
        }
        #endif