diff options
author | Roy Marples <roy@marples.name> | 2007-12-19 12:46:08 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-12-19 12:46:08 +0000 |
commit | cd45e5435762d8c6cd13287df7df16b97755176e (patch) | |
tree | ef0c7fb0a96e103e2a0dd79ee8c0f47f62ae7174 /src/rc-depend.c | |
parent | 2f7218c9849e667ba20d76e4dfe46b4bb195063a (diff) |
Introduce cbasename so we don't have to strdup(basename) and free all the time.
Diffstat (limited to 'src/rc-depend.c')
-rw-r--r-- | src/rc-depend.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rc-depend.c b/src/rc-depend.c index 8c61d888..9c870448 100644 --- a/src/rc-depend.c +++ b/src/rc-depend.c @@ -29,8 +29,6 @@ * SUCH DAMAGE. */ -#define APPLET "rc-depend" - #include <sys/types.h> #include <sys/stat.h> @@ -47,6 +45,8 @@ #include "rc-misc.h" #include "strlist.h" +static const char *applet; + rc_depinfo_t *_rc_deptree_load (int *regen) { if (rc_deptree_update_needed ()) { int retval; @@ -62,8 +62,6 @@ rc_depinfo_t *_rc_deptree_load (int *regen) { return (rc_deptree_load ()); } -static char *applet = NULL; - #include "_usage.h" #define getoptstring "t:suT" getoptstring_COMMON static struct option longopts[] = { @@ -98,7 +96,7 @@ int rc_depend (int argc, char **argv) int opt; char *token; - applet = argv[0]; + applet = cbasename (argv[0]); while ((opt = getopt_long (argc, argv, getoptstring, longopts, (int *) 0)) != -1) |