Appease GCC in hci_filter_test()
Cast the returned value from hci_filter_test explicitly to int, as requested by GCC when building with Undefined Behavior Sanitizer.
This commit is contained in:
parent
a9b2b066a2
commit
a5946f550b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hci.h,v 1.44 2017/12/21 09:30:30 plunky Exp $ */
|
||||
/* $NetBSD: hci.h,v 1.45 2018/07/25 19:09:38 kamil Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 Iain Hibbert.
|
||||
|
@ -54,7 +54,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: hci.h,v 1.44 2017/12/21 09:30:30 plunky Exp $
|
||||
* $Id: hci.h,v 1.45 2018/07/25 19:09:38 kamil Exp $
|
||||
* $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $
|
||||
*/
|
||||
|
||||
|
@ -2300,7 +2300,7 @@ hci_filter_test(uint8_t bit, const struct hci_filter *filter)
|
|||
uint8_t off = (uint8_t)((bit - 1) >> 5);
|
||||
uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
|
||||
|
||||
return (filter->mask[off] >> sh) & 1U;
|
||||
return (int)((filter->mask[off] >> sh) & 1U);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue