aboutsummaryrefslogtreecommitdiff
path: root/nscd/aicache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/aicache.c')
-rw-r--r--nscd/aicache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 26968b2d4a..a69a7781d3 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -339,7 +339,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
= (struct dataset *) mempool_alloc (db,
total
+ req->key_len);
- if (newp != NULL)
+ if (__builtin_expect (newp != NULL, 1))
{
/* Adjust pointer into the memory block. */
key_copy = (char *) newp + (key_copy
@@ -349,6 +349,8 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
total + req->key_len);
alloca_used = false;
}
+ else
+ ++db->head->addfailed;
/* Mark the old record as obsolete. */
dh->usable = false;