summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aacvar.h
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-11-30 22:17:27 +0000
committereadler <eadler@FreeBSD.org>2013-11-30 22:17:27 +0000
commit44c01df17391f4429ee371e8039ae4fd802c2a8e (patch)
tree050fb3b68519f6ef7d59051550fa29cdd79d6dac /sys/dev/aac/aacvar.h
parent5bcb8c5f4293579e5f8aba6f33f85246b7b70e5d (diff)
downloadFreeBSD-src-44c01df17391f4429ee371e8039ae4fd802c2a8e.zip
FreeBSD-src-44c01df17391f4429ee371e8039ae4fd802c2a8e.tar.gz
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
Diffstat (limited to 'sys/dev/aac/aacvar.h')
-rw-r--r--sys/dev/aac/aacvar.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h
index 0950a2f..bcedff5 100644
--- a/sys/dev/aac/aacvar.h
+++ b/sys/dev/aac/aacvar.h
@@ -412,7 +412,7 @@ struct aac_softc
#define AAC_FLAGS_RAW_IO (1 << 12) /* Raw I/O interface */
#define AAC_FLAGS_ARRAY_64BIT (1 << 13) /* 64-bit array size */
#define AAC_FLAGS_LBA_64BIT (1 << 14) /* 64-bit LBA support */
-#define AAC_FLAGS_NOMSI (1 << 31) /* Broken MSI */
+#define AAC_FLAGS_NOMSI (1U << 31) /* Broken MSI */
u_int32_t supported_options;
u_int32_t scsi_method_id;
OpenPOWER on IntegriCloud