Code: void hashtable_clear(hashtable_t *hashtable)
{
    size_t i;
 
     hashtable_do_clear(hashtable);
 
    for(i = 0; i < num_buckets(hashtable); i++)
     {
         hashtable->buckets[i].first = hashtable->buckets[i].last =
             &hashtable->list;
    }

    list_init(&hashtable->list);
    hashtable->size = 0;
}

Commit Message: CVE-2013-6401: Change hash function, randomize hashes

Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing.
CWE ID: CWE-310
void hashtable_clear(hashtable_t *hashtable)
{
    size_t i;
 
     hashtable_do_clear(hashtable);
 
    for(i = 0; i < hashsize(hashtable->order); i++)
     {
         hashtable->buckets[i].first = hashtable->buckets[i].last =
             &hashtable->list;
    }

    list_init(&hashtable->list);
    hashtable->size = 0;
}
