- if ((n = sd_listen_fds(true)) < 0) {
- log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
+ n = sd_listen_fds(true);
+ if (n < 0) {
+ log_error_errno(r, "Failed to read listening file descriptors from environment: %m");