netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=30192e7b515eec73b5b4d49aa4c10d5988069c8e

commit 30192e7b515eec73b5b4d49aa4c10d5988069c8e
Author: Alastair Poole <nets...@gmail.com>
Date:   Sat Apr 10 07:47:05 2021 +0100

    network: remove dead code.
---
 src/bin/system/machine/network.bogox | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/bin/system/machine/network.bogox 
b/src/bin/system/machine/network.bogox
index 43d047a..a864f83 100644
--- a/src/bin/system/machine/network.bogox
+++ b/src/bin/system/machine/network.bogox
@@ -95,26 +95,17 @@ _openbsd_generic_network_status(int *n)
         net_iface_t *iface = malloc(sizeof(net_iface_t));
         if (!iface) return NULL;
 
-/*
-        if (ifi->ifi_type == IFT_ETHER ||
-            ifi->ifi_type == IFT_FASTETHER ||
-            ifi->ifi_type == IFT_GIGABITETHERNET ||
-            ifi->ifi_type == IFT_IEEE80211)
-*/
+        net_iface_t *iface = malloc(sizeof(net_iface_t));
+        if (iface)
           {
-             net_iface_t *iface = malloc(sizeof(net_iface_t));
-             if (iface)
-               {
-                  snprintf(iface->name, sizeof(iface->name), "%s",
-                           ifa->ifa_name);
-                  iface->xfer.in = ifi->ifi_ibytes;
-                  iface->xfer.out = ifi->ifi_obytes;
-                  void *t = realloc(ifaces, (1 + 1 + *n) * sizeof(net_iface_t 
*));
-                  ifaces = t;
-                  ifaces[(*n)++] = iface;
-               }
+             snprintf(iface->name, sizeof(iface->name), "%s",
+                      ifa->ifa_name);
+             iface->xfer.in = ifi->ifi_ibytes;
+             iface->xfer.out = ifi->ifi_obytes;
+             void *t = realloc(ifaces, (1 + 1 + *n) * sizeof(net_iface_t *));
+             ifaces = t;
+             ifaces[(*n)++] = iface;
           }
-
      }
    close(sock);
 

-- 


Reply via email to