summaryrefslogtreecommitdiff
path: root/babeld/util.h
diff options
context:
space:
mode:
authorMatthieu Boutier <boutier@pps.jussieu.fr>2012-01-08 16:43:08 +0100
committerPaul Jakma <paul@quagga.net>2012-03-25 17:06:52 +0100
commitc7c53fa88ccdbc2d48cf7327c9e4f33cdc517a8a (patch)
tree9bd7e691165412840555be6d10a7a37b69b00bc0 /babeld/util.h
parent3dbda0ceebe369a1071600fe7d8d8ecf45f1027c (diff)
babeld: address some other compilation warnings.
Diffstat (limited to 'babeld/util.h')
-rw-r--r--babeld/util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/babeld/util.h b/babeld/util.h
index d653b613..4e7635f6 100644
--- a/babeld/util.h
+++ b/babeld/util.h
@@ -42,10 +42,10 @@ THE SOFTWARE.
#include "log.h"
#if defined(i386) || defined(__mc68020__) || defined(__x86_64__)
-#define DO_NTOHS(_d, _s) do { _d = ntohs(*(unsigned short*)(_s)); } while(0)
-#define DO_NTOHL(_d, _s) do { _d = ntohl(*(unsigned*)(_s)); } while(0)
-#define DO_HTONS(_d, _s) do { *(unsigned short*)(_d) = htons(_s); } while(0)
-#define DO_HTONL(_d, _s) do { *(unsigned*)(_d) = htonl(_s); } while(0)
+#define DO_NTOHS(_d, _s) do{ _d = ntohs(*(const unsigned short*)(_s)); }while(0)
+#define DO_NTOHL(_d, _s) do{ _d = ntohl(*(const unsigned*)(_s)); } while(0)
+#define DO_HTONS(_d, _s) do{ *(unsigned short*)(_d) = htons(_s); } while(0)
+#define DO_HTONL(_d, _s) do{ *(unsigned*)(_d) = htonl(_s); } while(0)
/* Some versions of gcc seem to be buggy, and ignore the packed attribute.
Disable this code until the issue is clarified. */
/* #elif defined __GNUC__*/