[Libreoffice-commits] .: 2 commits - sal/osl
Michael Meeks
mmeeks at kemper.freedesktop.org
Fri Nov 26 02:11:44 PST 2010
sal/osl/unx/util.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
New commits:
commit 4ae9032fbb695125714266f89ff6f06642191cef
Author: Michael Meeks <michael.meeks at novell.com>
Date: Fri Nov 26 10:11:38 2010 +0000
fix compilation issues
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index ff3daa6..cc63618 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -40,7 +40,7 @@
#endif
#include "osl/util.h"
-
+#include "osl/diagnose.h"
/*****************************************************************************/
@@ -57,12 +57,16 @@ static int osl_checkAddr(const char* addr);
sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
{
- struct ifconf ifc;
-
#ifdef SOLARIS
/** algorithm doesn't work on solaris */
return sal_False;
#else
+ char buff[1024];
+ char hard_addr[64];
+ struct ifconf ifc;
+ struct ifreq *ifr;
+ int i;
+ int so;
if ( pAddr == 0 )
{
@@ -191,8 +195,6 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
OSL_TRACE( "SIOCGIFADDR got '00:00:00:00:00:00'\n" );
return ret;
}
-
- OSL_TRACE( "interface: %s -- HWaddr : %s\n", ifname, print_ether(hard_addr) );
return 1;
}
commit 77bc438afb2837ba06b434d2d6f99b8c9d1631f0
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Nov 25 23:06:10 2010 +0100
unused variables in ./sal/osl/unx/util.c
Hello,
Here is a small patch for ./sal/osl/unx/util.c
Julien.
commit 9b18a955cd7ac4462c68b8113f73cd4dca2ccbbb
Author: serval <serval at 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..ff3daa6 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,7 @@ 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));*/
+ OSL_TRACE( "SIOCGIFCONF: %s\n", strerror(errno) );
close(so);
return sal_False;
}
@@ -141,7 +136,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
if ( ret < 0 )
{
-/* fprintf(stderr, "SIOCGIFFLAGS: %s\n", strerror(errno)); */
+ OSL_TRACE( "SIOCGIFFLAGS: %s\n", strerror(errno) );
close(so);
return ret;
}
@@ -153,7 +148,7 @@ 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));*/
+ OSL_TRACE( "SIOCGIFFLAGS : is LOOPBACK : %s\n", strerror(errno) );
close(so);
return 0;
}
@@ -170,7 +165,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
#endif
if (ret < 0) {
-/* fprintf(stderr, "SIOCGIFADDR: %s\n", strerror(errno));*/
+ OSL_TRACE( "SIOCGIFADDR: %s\n", strerror(errno) );
memset(hard_addr, 0, 32);
close(so);
return ret;
@@ -193,12 +188,11 @@ 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"); */
+ OSL_TRACE( "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));*/
+ OSL_TRACE( "interface: %s -- HWaddr : %s\n", ifname, print_ether(hard_addr) );
return 1;
}
More information about the Libreoffice-commits
mailing list