mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse-server: server: use spa_strstartswith()
This commit is contained in:
parent
cc12188763
commit
d939fa5b1c
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
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);
|
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 parse_unix_address(address + strlen("unix:"), addrs);
|
||||||
|
|
||||||
return -EAFNOSUPPORT;
|
return -EAFNOSUPPORT;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue