about summary refs log tree commit diff
path: root/nscd/hstcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/hstcache.c')
-rw-r--r--nscd/hstcache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 1f09c0b975..4d68ade98c 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -142,13 +142,14 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
 	    all_written = false;
 
 	  /* 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;
 	    }
-	  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;