aboutsummaryrefslogtreecommitdiff
path: root/libbb/xconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xconnect.c')
-rw-r--r--libbb/xconnect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index 1c8bb2b73..2a96e03dc 100644
--- a/libbb/xconnect.c
+++ b/libbb/xconnect.c
@@ -171,7 +171,7 @@ IF_NOT_FEATURE_IPV6(sa_family_t af = AF_INET;)
const char *cp;
struct addrinfo hint;
- if (ENABLE_FEATURE_UNIX_LOCAL && strncmp(host, "local:", 6) == 0) {
+ if (ENABLE_FEATURE_UNIX_LOCAL && is_prefixed_with(host, "local:")) {
struct sockaddr_un *sun;
r = xzalloc(LSA_LEN_SIZE + sizeof(struct sockaddr_un));