diff options
author | AndreyDobrovolskyOdessa <andrey.dobrovolsky.odessa@gmail.com> | 2021-03-19 21:49:27 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2021-03-19 21:01:14 +0100 |
commit | c7d55166043e524d37dfc49baae62203047ad9b7 (patch) | |
tree | bfc8bb4a42ee7fbd2387be5a5d280d51899ea5f6 | |
parent | 27e52f88774c1e61fef46ace84cde6f3160b2761 (diff) | |
download | redo-c-c7d55166043e524d37dfc49baae62203047ad9b7.tar.gz redo-c-c7d55166043e524d37dfc49baae62203047ad9b7.tar.xz redo-c-c7d55166043e524d37dfc49baae62203047ad9b7.zip |
remove unreachable code in run_script
dirprefix is always != 0, so unsetenv() will never be executed. Closes: #16 [via git-merge-pr]
-rw-r--r-- | redo.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/redo.c b/redo.c index a702d0d..227d9db 100644 --- a/redo.c +++ b/redo.c @@ -673,10 +673,7 @@ run_script(char *target, int implicit) snprintf(rel_target, sizeof rel_target, "%s%s%s", dirprefix, (*dirprefix ? "/" : ""), target); - if (dirprefix) - setenv("REDO_DIRPREFIX", dirprefix, 1); - else - unsetenv("REDO_DIRPREFIX"); + setenv("REDO_DIRPREFIX", dirprefix, 1); pid = fork(); if (pid < 0) { |