added demo of AIO/setresuid race
[tridge/junkcode.git] / xx.c
1
2
3 static uint32_t hash_fn(void *data);
4
5 struct myhash {
6         int hash_size;
7         struct hash_list *hash;
8 }
9
10 struct hash_list {
11         struct hash_list *next, *prev;
12         uint32_t full_hash;
13         void *data;
14 };
15
16
17
18 h = hash_fn(data);
19
20 list = myhash->hash[h % myhash->hash_size];
21 for (l=list;l;l=l->next) {
22         if (l->full_hash != h) continue;
23         if (strcmp(l->data, data) != 0) continue;
24         
25 }