diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-02 00:06:18 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-02 00:06:18 +0100 |
commit | 49bfc8774bf900fb2239a9b70b951aedccbfed5a (patch) | |
tree | a9568c2f49824df4b6add75f0a1882103a8c3ffa /src/basic/socket-util.c | |
parent | 1d0106996c2f80cdd0510206b9fd2d81d3fcd0cc (diff) |
fs-util: unify code we use to check if dirent's d_name is "." or ".."
We use different idioms at different places. Let's replace this is the
one true new idiom, that is even a bit faster...
Diffstat (limited to 'src/basic/socket-util.c')
-rw-r--r-- | src/basic/socket-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index 77f81a60ba..17e90a8994 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -877,7 +877,7 @@ bool ifname_valid(const char *p) { if (strlen(p) >= IFNAMSIZ) return false; - if (STR_IN_SET(p, ".", "..")) + if (dot_or_dot_dot(p)) return false; while (*p) { |