diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-09 12:50:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-10-09 14:45:55 +0200 |
commit | 9c57a73b13a388a132bd5c2170ef806b17601871 (patch) | |
tree | 0e447f0cef7dc02fb2a8eba2f5882fa418bc1efe /src/libsystemd/sd-netlink/sd-netlink.c | |
parent | hwdb: Map 45 to bookmarks on the ThinkPad L380 (diff) | |
download | systemd-9c57a73b13a388a132bd5c2170ef806b17601871.tar.xz systemd-9c57a73b13a388a132bd5c2170ef806b17601871.zip |
tree-wide: use CMP() macros where applicable
Diffstat (limited to 'src/libsystemd/sd-netlink/sd-netlink.c')
-rw-r--r-- | src/libsystemd/sd-netlink/sd-netlink.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index 15830d30c3..08b5707351 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -490,13 +490,7 @@ static int timeout_compare(const void *a, const void *b) { if (x->timeout == 0 && y->timeout != 0) return 1; - if (x->timeout < y->timeout) - return -1; - - if (x->timeout > y->timeout) - return 1; - - return 0; + return CMP(x->timeout, y->timeout); } int sd_netlink_call_async(sd_netlink *nl, |