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 /sysdeps/unix/sysv/linux/ifaddrs.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ifaddrs.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/ifaddrs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c index 7b8867100f..d83e8f8e84 100644 --- a/sysdeps/unix/sysv/linux/ifaddrs.c +++ b/sysdeps/unix/sysv/linux/ifaddrs.c @@ -175,7 +175,7 @@ __netlink_request (struct netlink_handle *h, int type) if (nladdr.nl_pid != 0) continue; - if (__builtin_expect (msg.msg_flags & MSG_TRUNC, 0)) + if (__glibc_unlikely (msg.msg_flags & MSG_TRUNC)) goto out_fail; size_t count = 0; @@ -459,7 +459,7 @@ getifaddrs_internal (struct ifaddrs **ifap) kernel. */ ifa_index = map_newlink (ifim->ifi_index - 1, ifas, map_newlink_data, newlink); - if (__builtin_expect (ifa_index == -1, 0)) + if (__glibc_unlikely (ifa_index == -1)) { try_again: result = -EAGAIN; @@ -552,7 +552,7 @@ getifaddrs_internal (struct ifaddrs **ifap) ifa_index = newlink + newaddr_idx; int idx = map_newlink (ifam->ifa_index - 1, ifas, map_newlink_data, newlink); - if (__builtin_expect (idx == -1, 0)) + if (__glibc_unlikely (idx == -1)) goto try_again; ifas[ifa_index].ifa.ifa_flags = ifas[idx].ifa.ifa_flags; if (ifa_index > 0) @@ -737,7 +737,7 @@ getifaddrs_internal (struct ifaddrs **ifap) { int idx = map_newlink (ifam->ifa_index - 1, ifas, map_newlink_data, newlink); - if (__builtin_expect (idx == -1, 0)) + if (__glibc_unlikely (idx == -1)) goto try_again; ifas[ifa_index].ifa.ifa_name = ifas[idx].ifa.ifa_name; } |