aboutsummaryrefslogtreecommitdiff
path: root/lib/libsdp
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-10-16 08:45:16 +0000
committerEd Schouten <ed@FreeBSD.org>2011-10-16 08:45:16 +0000
commit1e47e0ca1b19f3677186c170cd1ba635464e1c2c (patch)
treebdca608f8dcd011cc4f02991af0efd94a26d6111 /lib/libsdp
parent64995097ddeb829369956241db91fd1cb4040ea8 (diff)
downloadsrc-1e47e0ca1b19f3677186c170cd1ba635464e1c2c.tar.gz
src-1e47e0ca1b19f3677186c170cd1ba635464e1c2c.zip
Change the SDP_GET* macros to cast to a const buffer.
This fixes a compiler warning when passing a const buffer to them.
Notes
Notes: svn path=/head/; revision=226426
Diffstat (limited to 'lib/libsdp')
-rw-r--r--lib/libsdp/sdp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libsdp/sdp.h b/lib/libsdp/sdp.h
index acb074a7bb04..35dbea732fa5 100644
--- a/lib/libsdp/sdp.h
+++ b/lib/libsdp/sdp.h
@@ -312,13 +312,13 @@ typedef struct sdp_attr * sdp_attr_p;
/* Inline versions of get/put byte/short/long. Pointer is advanced */
#define SDP_GET8(b, cp) { \
- register uint8_t *t_cp = (uint8_t *)(cp); \
+ const uint8_t *t_cp = (const uint8_t *)(cp); \
(b) = *t_cp; \
(cp) ++; \
}
#define SDP_GET16(s, cp) { \
- register uint8_t *t_cp = (uint8_t *)(cp); \
+ const uint8_t *t_cp = (const uint8_t *)(cp); \
(s) = ((uint16_t)t_cp[0] << 8) \
| ((uint16_t)t_cp[1]) \
; \
@@ -326,7 +326,7 @@ typedef struct sdp_attr * sdp_attr_p;
}
#define SDP_GET32(l, cp) { \
- register uint8_t *t_cp = (uint8_t *)(cp); \
+ const uint8_t *t_cp = (const uint8_t *)(cp); \
(l) = ((uint32_t)t_cp[0] << 24) \
| ((uint32_t)t_cp[1] << 16) \
| ((uint32_t)t_cp[2] << 8) \