chiark / gitweb /
machine: make sure unpriviliged "machinectl status" can show the machine's OS version
[elogind.git] / src / shared / socket-label.c
index 1e78dd2569cf2002f649962666f0d3f062cd12d7..83ea1a9ef83323a3165c7ee93965841ec14fd8cb 100644 (file)
@@ -157,7 +157,7 @@ int make_socket_fd(int log_level, const char* address, int flags) {
         fd = socket_address_listen(&a, flags, SOMAXCONN, SOCKET_ADDRESS_DEFAULT,
                                    NULL, false, false, 0755, 0644, NULL);
         if (fd < 0 || log_get_max_level() >= log_level) {
-                char _cleanup_free_ *p = NULL;
+                _cleanup_free_ char *p = NULL;
 
                 r = socket_address_print(&a, &p);
                 if (r < 0) {
@@ -166,7 +166,7 @@ int make_socket_fd(int log_level, const char* address, int flags) {
                 }
 
                 if (fd < 0)
-                        log_error("Failed to listen on %s: %s", p, strerror(-r));
+                        log_error("Failed to listen on %s: %s", p, strerror(-fd));
                 else
                         log_full(log_level, "Listening on %s", p);
         }