From b9f65a60c28d191bb9bbd5668593e56885250644 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Tue, 16 Feb 2016 18:42:45 +0600 Subject: main: no need to set errno manually If we are not PID 1 and started as init, we executing systemctl with execv(). Here no need to set errno manually, because in a failure case, because the execv() anyway will set errno depends on a error. --- src/core/main.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/main.c') diff --git a/src/core/main.c b/src/core/main.c index e2088574c0..c725a686f1 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1313,7 +1313,6 @@ int main(int argc, char *argv[]) { /* This is compatibility support for SysV, where * calling init as a user is identical to telinit. */ - errno = -ENOENT; execv(SYSTEMCTL_BINARY_PATH, argv); log_error_errno(errno, "Failed to exec " SYSTEMCTL_BINARY_PATH ": %m"); return 1; -- cgit v1.2.3