diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2017-09-29 09:58:22 +0200 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2017-10-02 13:09:56 +0200 |
commit | ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359 (patch) | |
tree | 2be64c5b07a1c2cde8c2244a78b5e4c5e125e4b9 /src/nss-myhostname | |
parent | 3742095b27f8df4b195d530b52d15bc5fea70bf1 (diff) | |
download | systemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.tar.gz |
tree-wide: use `!IN_SET(..)` for `a != b && a != c && …`
The included cocci was used to generate the changes.
Thanks to @flo-wer for pointing this case out.
Diffstat (limited to 'src/nss-myhostname')
-rw-r--r-- | src/nss-myhostname/nss-myhostname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c index 1f27e06e6f..96ed161ba7 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c @@ -337,7 +337,7 @@ enum nss_status _nss_myhostname_gethostbyname3_r( if (af == AF_UNSPEC) af = AF_INET; - if (af != AF_INET && af != AF_INET6) { + if (!IN_SET(af, AF_INET, AF_INET6)) { *errnop = EAFNOSUPPORT; *h_errnop = NO_DATA; return NSS_STATUS_UNAVAIL; |