std::string.c_str() is never NULL

This commit is contained in:
Mathias Gumz 2008-01-25 08:21:35 +01:00
parent 70a24b992c
commit 65df54d635

View file

@ -325,11 +325,8 @@ int main(int argc, char **argv) {
if (!shell) if (!shell)
shell = "/bin/sh"; shell = "/bin/sh";
const char *arg = restart_argument.c_str(); execlp(shell, shell, "-c", restart_argument.c_str(), (const char *) NULL);
if (arg) { perror(restart_argument.c_str());
execlp(shell, shell, "-c", arg, (const char *) NULL);
perror(arg);
}
} }
// fall back in case the above execlp doesn't work // fall back in case the above execlp doesn't work