aboutsummaryrefslogtreecommitdiff
path: root/nscd/netgroupcache.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /nscd/netgroupcache.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nscd/netgroupcache.c')
-rw-r--r--nscd/netgroupcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
index be01fe8..426d3c5 100644
--- a/nscd/netgroupcache.c
+++ b/nscd/netgroupcache.c
@@ -120,7 +120,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
const char *key, uid_t uid, struct hashentry *he,
struct datahead *dh, struct dataset **resultp)
{
- if (__builtin_expect (debug_level > 0, 0))
+ if (__glibc_unlikely (debug_level > 0))
{
if (he == NULL)
dbg_log (_("Haven't found \"%s\" in netgroup cache!"), key);
@@ -398,7 +398,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
{
struct dataset *newp
= (struct dataset *) mempool_alloc (db, total + req->key_len, 1);
- if (__builtin_expect (newp != NULL, 1))
+ if (__glibc_likely (newp != NULL))
{
/* Adjust pointer into the memory block. */
key_copy = (char *) newp + (key_copy - buffer);
@@ -494,7 +494,7 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req,
key = (char *) rawmemchr (key, '\0') + 1;
const char *domain = *key++ ? key : NULL;
- if (__builtin_expect (debug_level > 0, 0))
+ if (__glibc_unlikely (debug_level > 0))
{
if (he == NULL)
dbg_log (_("Haven't found \"%s (%s,%s,%s)\" in netgroup cache!"),
@@ -531,7 +531,7 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req,
1);
struct indataset dataset_mem;
bool cacheable = true;
- if (__builtin_expect (dataset == NULL, 0))
+ if (__glibc_unlikely (dataset == NULL))
{
cacheable = false;
dataset = &dataset_mem;