From cd45e5435762d8c6cd13287df7df16b97755176e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 19 Dec 2007 12:46:08 +0000 Subject: Introduce cbasename so we don't have to strdup(basename) and free all the time. --- src/start-stop-daemon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/start-stop-daemon.c') diff --git a/src/start-stop-daemon.c b/src/start-stop-daemon.c index 82fa99a4..ba93a29e 100644 --- a/src/start-stop-daemon.c +++ b/src/start-stop-daemon.c @@ -33,8 +33,6 @@ * SUCH DAMAGE. */ -#define APPLET "start-stop-daemon" - /* nano seconds */ #define POLL_INTERVAL 20000000 #define WAIT_PIDFILE 500000000 @@ -90,7 +88,7 @@ typedef struct schedulelist } schedulelist_t; static schedulelist_t *schedule; -static char *applet; +static const char *applet; static char *changeuser; static char **newenv; @@ -574,7 +572,7 @@ int start_stop_daemon (int argc, char **argv) char *svcname = getenv ("SVCNAME"); char *env; - applet = argv[0]; + applet = cbasename (argv[0]); atexit (cleanup); signal (SIGINT, handle_signal); -- cgit v1.2.3