diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-04 15:19:47 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-04 15:32:04 -0700 |
commit | 79f342b954a6f47ee3f1277a899066a654e7c330 (patch) | |
tree | a9386ce1e108a5c046276e4266e0129404fc4ea0 /src/exec.cpp | |
parent | 527e5f52ba5a097a24490065fea23b4627032e4c (diff) |
lint cleanup: eliminate "redundant" errors
This removes some pointless parentheses but the primary focus is removing
redundancies like unnecessary "else" clauses.
Diffstat (limited to 'src/exec.cpp')
-rw-r--r-- | src/exec.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exec.cpp b/src/exec.cpp index b55e7a26..79f461d1 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -145,13 +145,14 @@ char *get_interpreter(const char *command, char *interpreter, size_t buff_size) interpreter[idx++] = '\0'; close(fd); } + if (strncmp(interpreter, "#! /", 4) == 0) { return interpreter + 3; } else if (strncmp(interpreter, "#!/", 3) == 0) { return interpreter + 2; - } else { - return NULL; } + + return NULL; } /// This function is executed by the child process created by a call to fork(). It should be called |