Skip to content

Commit

Permalink
(cache_add): Record the failure to add to the cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Jan 16, 2007
1 parent d68f5d2 commit f7685ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nscd/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet,
newp = mempool_alloc (table, sizeof (struct hashentry));
/* If we cannot allocate memory, just do not do anything. */
if (newp == NULL)
return -1;
{
++table->head->addfailed;
return -1;
}

newp->type = type;
newp->first = first;
Expand Down

0 comments on commit f7685ce

Please sign in to comment.