aboutsummaryrefslogtreecommitdiffstats
path: root/epan/pint.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-11-27 22:41:00 +0000
committerGuy Harris <guy@alum.mit.edu>2002-11-27 22:41:00 +0000
commit572dc4d5e4b8aca893dbd7765151c6aafc15fffa (patch)
treeb0b67c80721ab92b5066394d457a89e5d680f092 /epan/pint.h
parent08044b04099bb269634ce32d3654f7629f6900bf (diff)
The arguments to the "pntoh" and "pletoh" macros could be const
pointers, so cast them to "const guint8 *". svn path=/trunk/; revision=6681
Diffstat (limited to 'epan/pint.h')
-rw-r--r--epan/pint.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/epan/pint.h b/epan/pint.h
index 2138d85a56..200963da95 100644
--- a/epan/pint.h
+++ b/epan/pint.h
@@ -2,7 +2,7 @@
* Definitions for extracting and translating integers safely and portably
* via pointers.
*
- * $Id: pint.h,v 1.6 2002/08/28 20:40:44 jmayer Exp $
+ * $Id: pint.h,v 1.7 2002/11/27 22:41:00 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -35,31 +35,31 @@
*/
#define pntohs(p) ((guint16) \
- ((guint16)*((guint8 *)(p)+0)<<8| \
- (guint16)*((guint8 *)(p)+1)<<0))
+ ((guint16)*((const guint8 *)(p)+0)<<8| \
+ (guint16)*((const guint8 *)(p)+1)<<0))
-#define pntoh24(p) ((guint32)*((guint8 *)(p)+0)<<16| \
- (guint32)*((guint8 *)(p)+1)<<8| \
- (guint32)*((guint8 *)(p)+2)<<0)
+#define pntoh24(p) ((guint32)*((const guint8 *)(p)+0)<<16| \
+ (guint32)*((const guint8 *)(p)+1)<<8| \
+ (guint32)*((const guint8 *)(p)+2)<<0)
-#define pntohl(p) ((guint32)*((guint8 *)(p)+0)<<24| \
- (guint32)*((guint8 *)(p)+1)<<16| \
- (guint32)*((guint8 *)(p)+2)<<8| \
- (guint32)*((guint8 *)(p)+3)<<0)
+#define pntohl(p) ((guint32)*((const guint8 *)(p)+0)<<24| \
+ (guint32)*((const guint8 *)(p)+1)<<16| \
+ (guint32)*((const guint8 *)(p)+2)<<8| \
+ (guint32)*((const guint8 *)(p)+3)<<0)
#define pletohs(p) ((guint16) \
- ((guint16)*((guint8 *)(p)+1)<<8| \
- (guint16)*((guint8 *)(p)+0)<<0))
+ ((guint16)*((const guint8 *)(p)+1)<<8| \
+ (guint16)*((const guint8 *)(p)+0)<<0))
-#define pletoh24(p) ((guint32)*((guint8 *)(p)+2)<<16| \
- (guint32)*((guint8 *)(p)+1)<<8| \
- (guint32)*((guint8 *)(p)+0)<<0)
+#define pletoh24(p) ((guint32)*((const guint8 *)(p)+2)<<16| \
+ (guint32)*((const guint8 *)(p)+1)<<8| \
+ (guint32)*((const guint8 *)(p)+0)<<0)
-#define pletohl(p) ((guint32)*((guint8 *)(p)+3)<<24| \
- (guint32)*((guint8 *)(p)+2)<<16| \
- (guint32)*((guint8 *)(p)+1)<<8| \
- (guint32)*((guint8 *)(p)+0)<<0)
+#define pletohl(p) ((guint32)*((const guint8 *)(p)+3)<<24| \
+ (guint32)*((const guint8 *)(p)+2)<<16| \
+ (guint32)*((const guint8 *)(p)+1)<<8| \
+ (guint32)*((const guint8 *)(p)+0)<<0)