mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
socket-server: Improve readability
This commit is contained in:
parent
66f97c35bd
commit
9b87baf58a
1 changed files with 14 additions and 16 deletions
|
|
@ -260,15 +260,14 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address
|
|||
if (errno == EADDRINUSE && fallback) {
|
||||
sa.sin_port = 0;
|
||||
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) >= 0)
|
||||
goto good;
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
|
||||
good:
|
||||
;
|
||||
}
|
||||
|
||||
if (listen(fd, 5) < 0) {
|
||||
|
|
@ -329,15 +328,14 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
|
|||
if (errno == EADDRINUSE && fallback) {
|
||||
sa.sin6_port = 0;
|
||||
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) >= 0)
|
||||
goto good;
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
|
||||
good:
|
||||
;
|
||||
}
|
||||
|
||||
if (listen(fd, 5) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue