std::string.c_str() is never NULL
Mathias Gumz akira at fluxbox dot org
1 files changed,
2 insertions(+),
5 deletions(-)
jump to
M
src/main.cc
→
src/main.cc
@@ -325,11 +325,8 @@ const char *shell = getenv("SHELL");
if (!shell) shell = "/bin/sh"; - const char *arg = restart_argument.c_str(); - if (arg) { - execlp(shell, shell, "-c", arg, (const char *) NULL); - perror(arg); - } + execlp(shell, shell, "-c", restart_argument.c_str(), (const char *) NULL); + perror(restart_argument.c_str()); } // fall back in case the above execlp doesn't work