summary refs log tree commit diff
path: root/nscd/aicache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/aicache.c')
-rw-r--r--nscd/aicache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index b1369214ea..8d100f8d31 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -512,14 +512,15 @@ next_nip:
 	TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
 
       /* If we cannot permanently store the result, so be it.  */
-      if (db->negtimeout == 0)
+      if (__builtin_expect (db->negtimeout == 0, 0))
 	{
 	  /* Mark the old entry as obsolete.  */
 	  if (dh != NULL)
 	    dh->usable = false;
 	  dataset = NULL;
 	}
-      else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
+      else if ((dataset = mempool_alloc (db, (sizeof (struct dataset)
+					      + req->key_len), 1)) != NULL)
 	{
 	  dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
 	  dataset->head.recsize = total;