aboutsummaryrefslogtreecommitdiff
path: root/src/rc-update.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-19 12:46:08 +0000
committerRoy Marples <roy@marples.name>2007-12-19 12:46:08 +0000
commitcd45e5435762d8c6cd13287df7df16b97755176e (patch)
treeef0c7fb0a96e103e2a0dd79ee8c0f47f62ae7174 /src/rc-update.c
parent2f7218c9849e667ba20d76e4dfe46b4bb195063a (diff)
Introduce cbasename so we don't have to strdup(basename) and free all the time.
Diffstat (limited to 'src/rc-update.c')
-rw-r--r--src/rc-update.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rc-update.c b/src/rc-update.c
index 3ab52fd1..3c366be4 100644
--- a/src/rc-update.c
+++ b/src/rc-update.c
@@ -29,8 +29,6 @@
* SUCH DAMAGE.
*/
-#define APPLET "rc-update"
-
#include <errno.h>
#include <getopt.h>
#include <limits.h>
@@ -46,7 +44,7 @@
#include "rc-misc.h"
#include "strlist.h"
-static char *applet = NULL;
+static const char *applet = NULL;
/* Return the number of changes made:
* -1 = no changes (error)
@@ -161,7 +159,7 @@ int rc_update (int argc, char **argv)
int opt;
int retval = EXIT_FAILURE;
- applet = argv[0];
+ applet = cbasename (argv[0]);
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)