Commits

Paul Barbu - Gheorghe committed eaf69b0

code cleanup

  • Participants
  • Parent commits 9f5ff67

Comments (0)

Files changed (1)

 
     while(!feof(f) && fgets(line, sizeof(line)-1, f) != NULL ){
         if(strstr(line, iface)){
-            sscanf(line, "%*s %ld %*d %*d %*d %*d %*d %*d %*d %ld", &usage.in, &usage.out);
+            sscanf(line, "%*s %ld %*d %*d %*d %*d %*d %*d %*d %ld",
+                    &usage.in, &usage.out);
         }
     }
 
 {
     //TODO: what happens with avgs, bat, etc if I exit at an exit(1) aka: FREE
     //THEM!
-    //TODO: current network usage, weather stats, computer
-    //temperature, check: https://code.google.com/p/dwm-hacks/
+    //TODO: weather stats, computer temperature, check: https://code.google.com/p/dwm-hacks/
     char *status;
-    char *avgs;
     char *bat;
     char *tmbuc;
     char *mpd;
 
     for (;;sleep(1)) {
         net_f_usage = getnet(iface);
-        avgs = loadavg();
         bat = getbattery("/proc/acpi/battery/BAT0");
         tmbuc = mktimes("%d-%m-%Y %R", tzbuc);
         mpd = getmpd();
 
         setstatus(status);
 
-        free(avgs);
         free(bat);
         free(tmbuc);
         free(mpd);