~ubuntu-branches/ubuntu/trusty/rpm/trusty

« back to all changes in this revision

Viewing changes to lib/rpmhash.C

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2010-06-28 11:12:30 UTC
  • mfrom: (17.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100628111230-8ggjjhgpvrnr3ybx
Tags: 4.8.1-5
Fix compilation on hurd and kfreebsd (Closes: #587366).

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    hash = ht->fn(key) % ht->numBuckets;
51
51
    b = ht->buckets[hash];
52
52
 
53
 
    while (b && b->key && ht->eq(b->key, key))
 
53
    while (b && ht->eq(b->key, key))
54
54
        b = b->next;
55
55
 
56
56
    return b;
92
92
    b = ht->buckets[hash];
93
93
    b_addr = ht->buckets + hash;
94
94
 
95
 
    while (b && b->key && ht->eq(b->key, key)) {
 
95
    while (b && ht->eq(b->key, key)) {
96
96
        b_addr = &(b->next);
97
97
        b = b->next;
98
98
    }
123
123
{
124
124
    Bucket b, n;
125
125
    int i;
126
 
 
 
126
    if (ht==NULL)
 
127
        return ht;
127
128
    for (i = 0; i < ht->numBuckets; i++) {
128
129
        b = ht->buckets[i];
129
130
        if (b == NULL)
171
172
        *data = rc ? b->data : NULL;
172
173
    if (dataCount)
173
174
        *dataCount = rc ? b->dataCount : 0;
174
 
    if (tableKey)
175
 
        *tableKey = rc ? b->key : NULL;
 
175
    if (tableKey && rc)
 
176
        *tableKey = b->key;
176
177
 
177
178
    return rc;
178
179
}