(cache_add): Record the failure to add to the cache.

This commit is contained in:
Ulrich Drepper 2007-01-16 00:23:46 +00:00
parent d68f5d2cff
commit f7685cef4c

View File

@ -153,7 +153,10 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet,
newp = mempool_alloc (table, sizeof (struct hashentry)); newp = mempool_alloc (table, sizeof (struct hashentry));
/* If we cannot allocate memory, just do not do anything. */ /* If we cannot allocate memory, just do not do anything. */
if (newp == NULL) if (newp == NULL)
return -1; {
++table->head->addfailed;
return -1;
}
newp->type = type; newp->type = type;
newp->first = first; newp->first = first;