Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hello,

Here is a small patch for ./sal/osl/unx/util.c

Julien.
commit 9b18a955cd7ac4462c68b8113f73cd4dca2ccbbb
Author: serval <serval@ilapharm.com>
Date:   Thu Nov 25 23:03:04 2010 +0100

    ure : remove unused variables

diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index dad9934..91b7b0d 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -57,12 +57,7 @@ static int   osl_checkAddr(const char* addr);
 
 sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
 {
-    char buff[1024];
-    char hard_addr[64];
     struct ifconf ifc;
-    struct ifreq *ifr;
-    int i;
-    int so;
 
 #ifdef SOLARIS
     /** algorithm doesn't work on solaris */
@@ -92,7 +87,6 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
     ifc.ifc_buf = buff;
     if ( ioctl(so, SIOCGIFCONF, &ifc) < 0 )
     {
-/*             fprintf(stderr, "SIOCGIFCONF: %s\n", strerror(errno));*/
         close(so);
         return sal_False;
     }
@@ -141,7 +135,6 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
 
     if ( ret < 0 )
     { 
-/*             fprintf(stderr, "SIOCGIFFLAGS: %s\n", strerror(errno)); */
         close(so);
         return ret;
     } 
@@ -153,7 +146,6 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
     
     if (ifr.ifr_flags & IFF_LOOPBACK)
     {
-/*             fprintf(stderr, "SIOCGIFFLAGS : is LOOPBACK : %s\n", strerror(errno));*/
         close(so);
         return 0;
     }
@@ -170,7 +162,6 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
 #endif
 
     if (ret < 0) {     
-/*             fprintf(stderr, "SIOCGIFADDR: %s\n", strerror(errno));*/
         memset(hard_addr, 0, 32);
         close(so);
         return ret;
@@ -193,13 +184,9 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
     ret=osl_checkAddr(hard_addr);
 
     if (ret < 0) {
-/*             fprintf(stderr, "SIOCGIFADDR got '00:00:00:00:00:00'\n"); */
         return ret;  
     }
     
-/*     fprintf(stderr,"interface : %s -- ",ifname);*/
-/*     fprintf(stderr,"HWaddr : %s\n", print_ether(hard_addr));*/
-
     return 1;
 }
 

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.