diff options
Diffstat (limited to 'usr.sbin/nsd/util.h')
-rw-r--r-- | usr.sbin/nsd/util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/nsd/util.h b/usr.sbin/nsd/util.h index 9d243a311ba..d0b942869a2 100644 --- a/usr.sbin/nsd/util.h +++ b/usr.sbin/nsd/util.h @@ -230,9 +230,9 @@ static inline uint16_t read_uint16(const void *src) { #ifdef ALLOW_UNALIGNED_ACCESSES - return ntohs(* (uint16_t *) src); + return ntohs(* (const uint16_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return (p[0] << 8) | p[1]; #endif } @@ -241,9 +241,9 @@ static inline uint32_t read_uint32(const void *src) { #ifdef ALLOW_UNALIGNED_ACCESSES - return ntohl(* (uint32_t *) src); + return ntohl(* (const uint32_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; #endif } @@ -251,7 +251,7 @@ read_uint32(const void *src) static inline uint64_t read_uint64(const void *src) { - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ((uint64_t)p[0] << 56) | ((uint64_t)p[1] << 48) | |