From 65df54d635e8ad2029efea1c3c00eccfffe8532d Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Fri, 25 Jan 2008 08:21:35 +0100 Subject: std::string.c_str() is never NULL --- src/main.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.cc b/src/main.cc index ae2b98c..9da51ec 100644 --- a/src/main.cc +++ b/src/main.cc @@ -325,11 +325,8 @@ int main(int argc, char **argv) { 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 -- cgit v0.11.2