blob: 734826a647dd52919acaf73c51e2257aeae91f78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
https://sourceforge.net/tracker/index.php?func=detail&aid=2815842&group_id=72892&atid=536042
*** hash.c-old Thu Jul 2 15:30:55 2009
--- hash.c Thu Jul 2 15:48:39 2009
***************
*** 1354,1360 ****
hi->value = value;
/* hash to the bucket */
! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
/* walk the list to make sure we do not have a duplicate */
ll = &(bucket->list);
--- 1354,1360 ----
hi->value = value;
/* hash to the bucket */
! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
/* walk the list to make sure we do not have a duplicate */
ll = &(bucket->list);
***************
*** 1408,1414 ****
pidthr_t k1;
/* find the bucket */
! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
/* walk the list until we find the existing item */
ll = &(bucket->list);
--- 1408,1414 ----
pidthr_t k1;
/* find the bucket */
! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
/* walk the list until we find the existing item */
ll = &(bucket->list);
***************
*** 1460,1466 ****
pidthr_t k1;
result = NULL;
! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
{
ll = &(bucket->list);
li = LL_FIRST(ll);
--- 1460,1466 ----
pidthr_t k1;
result = NULL;
! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
{
ll = &(bucket->list);
li = LL_FIRST(ll);
***************
*** 1499,1505 ****
pidthr_t k1;
result = NULL;
! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
{
ll = &(bucket->list);
li = LL_FIRST(ll);
--- 1499,1505 ----
pidthr_t k1;
result = NULL;
! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
{
ll = &(bucket->list);
li = LL_FIRST(ll);
|