From d939fa5b1c4859e9fbb1361c961a74101d50de10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 11 Nov 2021 23:32:40 +0100 Subject: [PATCH] pulse-server: server: use `spa_strstartswith()` --- src/modules/module-protocol-pulse/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/server.c b/src/modules/module-protocol-pulse/server.c index 6232177dc..d3e14d2b5 100644 --- a/src/modules/module-protocol-pulse/server.c +++ b/src/modules/module-protocol-pulse/server.c @@ -886,10 +886,10 @@ static int server_start(struct server *server, const struct sockaddr_storage *ad static int parse_address(const char *address, struct pw_array *addrs) { - if (strncmp(address, "tcp:", strlen("tcp:")) == 0) + if (spa_strstartswith(address, "tcp:")) return parse_ip_address(address + strlen("tcp:"), addrs); - if (strncmp(address, "unix:", strlen("unix:")) == 0) + if (spa_strstartswith(address, "unix:")) return parse_unix_address(address + strlen("unix:"), addrs); return -EAFNOSUPPORT;