summaryrefslogtreecommitdiff
path: root/src/basic/socket-util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-10-04 23:01:32 +0900
committerSven Eden <yamakuzure@gmx.net>2017-12-08 07:27:34 +0100
commit5b65a773c10cdab7e9f36312dd4f7cabea3d9bf5 (patch)
treeb3af58441e6566e5629b721c07f7606b14d79e54 /src/basic/socket-util.c
parent76937fb46f5e25e982ea90243b625cf91a869964 (diff)
tree-wide: use IN_SET macro (#6977)
Diffstat (limited to 'src/basic/socket-util.c')
-rw-r--r--src/basic/socket-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index ef3c59172..f71fb98f2 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -49,7 +49,7 @@
#include "util.h"
#if 0 /// UNNEEDED by elogind
-#if ENABLE_IDN
+#ifdef ENABLE_IDN
# define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
#else
# define IDN_FLAGS 0
@@ -895,7 +895,7 @@ bool ifname_valid(const char *p) {
if ((unsigned char) *p <= 32U)
return false;
- if (*p == ':' || *p == '/')
+ if (IN_SET(*p, ':', '/'))
return false;
numeric = numeric && (*p >= '0' && *p <= '9');