summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-03-27 07:09:25 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-03-27 07:09:25 +0000
commit984b5e9c22fbfc1646a6982732e5ce2aa18c35fa (patch)
treef90ab70a29ec69aff90e14e094c8fe6fb51cb766
parenta8e1c7d6beb2ac495ef1061884baf64dac4b37db (diff)
Kill lint warning by using unsigned right hand arg to >>
Right shifting signed values is undefined. From claudio@ ok millert@; comitted by request of deraadt@
-rw-r--r--sys/sys/endian.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/endian.h b/sys/sys/endian.h
index 14d79a68087..cec7e93558e 100644
--- a/sys/sys/endian.h
+++ b/sys/sys/endian.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: endian.h,v 1.17 2006/01/06 18:53:05 millert Exp $ */
+/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */
/*-
* Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
@@ -84,7 +84,7 @@
/* Note that these macros evaluate their arguments several times. */
#define __swap16gen(x) \
- (__uint16_t)(((__uint16_t)(x) & 0xff) << 8 | ((__uint16_t)(x) & 0xff00) >> 8)
+ (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
#define __swap32gen(x) \
(__uint32_t)(((__uint32_t)(x) & 0xff) << 24 | \