aboutsummaryrefslogtreecommitdiff
path: root/src/ds
diff options
context:
space:
mode:
authorMosder <git@mosder.eu>2026-10-20 16:18:04 +0200
committerMosder <git@mosder.eu>2026-10-20 16:18:04 +0200
commit4c003115e16331d7389a8a810caa17d526881703 (patch)
tree2fa31cb360a600f5bed2552d9247aca5eaaf6aa9 /src/ds
parentfc5f5f1f58542500734841822768267d0ece2456 (diff)
feat: improved compatibility for specific platforms
Diffstat (limited to 'src/ds')
-rw-r--r--src/ds/hashmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ds/hashmap.c b/src/ds/hashmap.c
index a08ce70..db09eac 100644
--- a/src/ds/hashmap.c
+++ b/src/ds/hashmap.c
@@ -27,29 +27,29 @@ static void *hdr2hm(Header *hdr) {
}
static int filled(const void *hm, size_t i) {
- return hm2hdr(hm)->filled_dead_map[i / 8] & (1 << (i % 8 + 8));
+ return hm2hdr(hm)->filled_dead_map[i / 8] & (1u << (i % 8 + 8));
}
static void fill(void *hm, size_t i) {
Header *hdr = hm2hdr(hm);
hdr->n_filled++;
- hdr->filled_dead_map[i / 8] |= (1 << (i % 8 + 8));
+ hdr->filled_dead_map[i / 8] |= (1u << (i % 8 + 8));
}
static int dead(const void *hm, size_t i) {
- return hm2hdr(hm)->filled_dead_map[i / 8] & (1 << i % 8);
+ return hm2hdr(hm)->filled_dead_map[i / 8] & (1u << i % 8);
}
static void kill(void *hm, size_t i) {
Header *hdr = hm2hdr(hm);
hdr->n_dead++;
- hdr->filled_dead_map[i / 8] |= (1 << i % 8);
+ hdr->filled_dead_map[i / 8] |= (1u << i % 8);
}
static void unkill(void *hm, size_t i) {
Header *hdr = hm2hdr(hm);
hdr->n_dead--;
- hdr->filled_dead_map[i / 8] &= ~(1 << i % 8);
+ hdr->filled_dead_map[i / 8] &= ~(1u << i % 8);
}
// FNV-1a