diff options
author | Alexander Kuleshov <kuleshovmail@gmail.com> | 2016-02-16 18:42:45 +0600 |
---|---|---|
committer | Alexander Kuleshov <kuleshovmail@gmail.com> | 2016-02-16 18:56:15 +0600 |
commit | b9f65a60c28d191bb9bbd5668593e56885250644 (patch) | |
tree | 1e74ccb4a1b9a87d3fb658e0703adab28a831ac8 /src | |
parent | 6043679c6ec485a96926f07c26d77f2c0c246fe2 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 1 |
1 files changed, 0 insertions, 1 deletions
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; |