Address Coverity issues (#13364)
Stelios Fragkakis committed
Jul 12, 2022 at 14:54 UTC
2679cfdd00cf6e43f72353f88d097fef5df654ff
1 file changed
+3
-3
libnetdata/libnetdata.c
+3
-3
@@ -1539,14 +1539,14 @@ char *find_and_replace(const char *src, const char *find, const char *replace, c
1539
bool bitmap256_get_bit(BITMAP256 *ptr, uint8_t idx) {
1540
if (unlikely(!ptr))
1541
return false;
1542
- return (ptr->data[idx / 64] & (1 << (idx % 64)));
1542
+ return (ptr->data[idx / 64] & (1ULL << (idx % 64)));
1543
}
1544
1545
void bitmap256_set_bit(BITMAP256 *ptr, uint8_t idx, bool value) {
1546
if (unlikely(!ptr))
1547
return;
1548
if (likely(value))
1549
- ptr->data[idx / 64] |= (1U << (idx % 64));
1549
+ ptr->data[idx / 64] |= (1ULL << (idx % 64));
1550
else
1551
- ptr->data[idx / 64] &= ~(1U << (idx % 64));
1551
+ ptr->data[idx / 64] &= ~(1ULL << (idx % 64));
1552
}