summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2016-03-17 02:25:32 +0000
committerchristos <christos@NetBSD.org>2016-03-17 02:25:32 +0000
commitefa8c3559905bda9a8ddc813513e651118f8fbfb (patch)
treead8728e2dbbb430747f665a3eb8068086e992f06 /include
parent12256b2ae09fc4204273c510ee67a7f6ccb1ef5b (diff)
more casting fixes
Diffstat (limited to 'include')
-rw-r--r--include/bitstring.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/bitstring.h b/include/bitstring.h
index df43a1b2dbd..5da6ef0bf4d 100644
--- a/include/bitstring.h
+++ b/include/bitstring.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bitstring.h,v 1.13 2016/03/17 00:15:27 christos Exp $ */
+/* $NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -82,11 +82,13 @@ typedef unsigned char bitstr_t;
/* set bit N of bitstring name */
#define bit_set(name, bit) \
/*LINTED bitwise on signed*/ \
- ((name)[_bit_byte(bit)] = _bit_mask(bit) | (name)[bit_byte(bit))
+ ((name)[_bit_byte(bit)] = \
+ (unsigned char)(_bit_mask(bit) | (name)[_bit_byte(bit)]))
/* clear bit N of bitstring name */
#define bit_clear(name, bit) \
- /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] &= ~_bit_mask(bit))
+ /*LINTED bitwise on signed*/ \
+ ((name)[_bit_byte(bit)] &= (unsigned char)~_bit_mask(bit))
/* clear bits start ... stop in bitstring */
#define bit_nclear(name, start, stop) do { \