It's used only in one place in tests which isn't even automatically
evaluated.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
virHashSearch;
virHashSize;
virHashSteal;
-virHashTableSize;
virHashUpdateEntry;
virHashValueFree;
return table->nbElems;
}
-/**
- * virHashTableSize:
- * @table: the hash table
- *
- * Query the size of the hash @table, i.e., number of buckets in the table.
- *
- * Returns the number of keys in the hash table or
- * -1 in case of error
- */
-ssize_t
-virHashTableSize(const virHashTable *table)
-{
- if (table == NULL)
- return -1;
- return table->size;
-}
-
/**
* virHashRemoveEntry:
virHashKeyFree keyFree);
void virHashFree(virHashTablePtr table);
ssize_t virHashSize(const virHashTable *table);
-ssize_t virHashTableSize(const virHashTable *table);
/*
* Add a new entry to the hash table.
* collision list in the same order as in the uuids array
*/
for (i = G_N_ELEMENTS(uuids) - 1; i >= 0; i--) {
- ssize_t oldsize = virHashTableSize(hash);
if (virHashAddEntry(hash, uuids[i], (void *) uuids[i]) < 0) {
virHashFree(hash);
return NULL;
}
-
- if (virHashTableSize(hash) != oldsize) {
- VIR_TEST_DEBUG("hash grown from %zu to %zu",
- (size_t)oldsize, (size_t)virHashTableSize(hash));
- }
}
for (i = 0; i < G_N_ELEMENTS(uuids); i++) {