projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
412ac78
)
network: fix issue found by UBSan
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 5 Jul 2019 07:37:34 +0000
(16:37 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 5 Jul 2019 07:37:34 +0000
(16:37 +0900)
src/network/networkd-brvlan.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-brvlan.c
b/src/network/networkd-brvlan.c
index
cadaaff
..
c3c5d53
100644
(file)
--- a/
src/network/networkd-brvlan.c
+++ b/
src/network/networkd-brvlan.c
@@
-19,12
+19,12
@@
static bool is_bit_set(unsigned bit, uint32_t scope) {
assert(bit < sizeof(scope)*8);
- return scope & (
1
<< bit);
+ return scope & (
UINT32_C(1)
<< bit);
}
static void set_bit(unsigned nr, uint32_t *addr) {
if (nr < BRIDGE_VLAN_BITMAP_MAX)
- addr[nr / 32] |= (
((uint32_t)
1) << (nr % 32));
+ addr[nr / 32] |= (
UINT32_C(
1) << (nr % 32));
}
static int find_next_bit(int i, uint32_t x) {