summaryrefslogtreecommitdiff
path: root/src/nss-resolve
diff options
context:
space:
mode:
Diffstat (limited to 'src/nss-resolve')
-rw-r--r--src/nss-resolve/nss-resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index ec059d9586..17d125c821 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -307,7 +307,7 @@ enum nss_status _nss_resolve_gethostbyname3_r(
if (af == AF_UNSPEC)
af = AF_INET;
- if (af != AF_INET && af != AF_INET6) {
+ if (!IN_SET(af, AF_INET, AF_INET6)) {
r = -EAFNOSUPPORT;
goto fail;
}