[Lcdproc] FIX: lcdproc iface.c

Markus Dolze bsdfan@nurfuerspam.de
Wed May 3 06:19:02 2006


This is a multi-part message in MIME format.
--------------070605020806050507070503
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Fix build on FreeBSD.

Markus

--------------070605020806050507070503
Content-Type: text/plain;
 name="patch-clients_lcdproc_iface.c.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-clients_lcdproc_iface.c.txt"

Index: clients/lcdproc/iface.c
===================================================================
RCS file: /cvsroot/lcdproc/lcdproc/clients/lcdproc/iface.c,v
retrieving revision 1.2
diff -u -r1.2 iface.c
--- clients/lcdproc/iface.c     28 Apr 2006 09:26:40 -0000      1.2
+++ clients/lcdproc/iface.c     3 May 2006 06:17:16 -0000
@@ -546,7 +546,7 @@
                                break;
                        }
                        /* check if its interface name matches */
-                       if (strcmp(ifmd.ifmd_name, iface_name) == 0) {
+                       if (strcmp(ifmd.ifmd_name, interface->name) == 0) {
                                interface->last_online = time(NULL);    /* save actual time */

                                if ((ifmd.ifmd_flags & IFF_UP) == IFF_UP)
@@ -568,7 +568,7 @@
                        }
                }
                /* if we are here there is no interface with the given name */
-               fprintf(stderr, "There is no interface named %s\n", iface_name);
+               fprintf(stderr, "There is no interface named %s\n", interface->name);
                return 0;
        } else {
                perror("get_iface_stats");

--------------070605020806050507070503--