aboutsummaryrefslogtreecommitdiff
path: root/src/fstabinfo.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/fstabinfo.c
parent2f7218c9849e667ba20d76e4dfe46b4bb195063a (diff)
Introduce cbasename so we don't have to strdup(basename) and free all the time.
Diffstat (limited to 'src/fstabinfo.c')
-rw-r--r--src/fstabinfo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fstabinfo.c b/src/fstabinfo.c
index 9782f9da..56957c47 100644
--- a/src/fstabinfo.c
+++ b/src/fstabinfo.c
@@ -31,7 +31,6 @@
#include <errno.h>
#include <getopt.h>
-#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -87,7 +86,7 @@ static struct mntent *getmntfile (const char *file)
}
#endif
-static const char *applet;
+static const char *applet = NULL;
#include "_usage.h"
#define getoptstring "bmop:t:" getoptstring_COMMON
@@ -129,7 +128,7 @@ int fstabinfo (int argc, char **argv)
char *file;
bool filtered = false;
- applet = basename (argv[0]);
+ applet = cbasename (argv[0]);
/* Ensure that we are only quiet when explicitly told to be */
unsetenv ("EINFO_QUIET");