summaryrefslogtreecommitdiff
path: root/src/basic/socket-label.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/socket-label.c')
-rw-r--r--src/basic/socket-label.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/basic/socket-label.c b/src/basic/socket-label.c
index 144e6fd86e..e5d4efc719 100644
--- a/src/basic/socket-label.c
+++ b/src/basic/socket-label.c
@@ -19,18 +19,20 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <string.h>
-#include <unistd.h>
#include <errno.h>
-#include <sys/stat.h>
#include <stddef.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include "alloc-util.h"
+#include "fd-util.h"
#include "macro.h"
-#include "util.h"
-#include "mkdir.h"
#include "missing.h"
+#include "mkdir.h"
#include "selinux-util.h"
#include "socket-util.h"
+#include "util.h"
int socket_address_listen(
const SocketAddress *a,
@@ -146,11 +148,8 @@ int make_socket_fd(int log_level, const char* address, int flags) {
int fd, r;
r = socket_address_parse(&a, address);
- if (r < 0) {
- log_error("Failed to parse socket address \"%s\": %s",
- address, strerror(-r));
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to parse socket address \"%s\": %m", address);
fd = socket_address_listen(&a, flags, SOMAXCONN, SOCKET_ADDRESS_DEFAULT,
NULL, false, false, false, 0755, 0644, NULL);