diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /nscd/nscd_getpw_r.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nscd/nscd_getpw_r.c')
-rw-r--r-- | nscd/nscd_getpw_r.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c index 5454ab62ad..278b9db8ff 100644 --- a/nscd/nscd_getpw_r.c +++ b/nscd/nscd_getpw_r.c @@ -134,7 +134,7 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, /* No value found so far. */ *result = NULL; - if (__builtin_expect (pw_resp.found == -1, 0)) + if (__glibc_unlikely (pw_resp.found == -1)) { /* The daemon does not cache this database. */ __nss_not_use_nscd_passwd = 1; @@ -165,9 +165,9 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, p += pw_resp.pw_shell_len; ssize_t total = p - buffer; - if (__builtin_expect (pw_name + total > recend, 0)) + if (__glibc_unlikely (pw_name + total > recend)) goto out_close; - if (__builtin_expect (buflen < total, 0)) + if (__glibc_unlikely (buflen < total)) { __set_errno (ERANGE); retval = ERANGE; @@ -179,7 +179,7 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, { ssize_t nbytes = __readall (sock, buffer, total); - if (__builtin_expect (nbytes != total, 0)) + if (__glibc_unlikely (nbytes != total)) { /* The `errno' to some value != ERANGE. */ __set_errno (ENOENT); |