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/fstabinfo.c | |
parent | 2f7218c9849e667ba20d76e4dfe46b4bb195063a (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.c | 5 |
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"); |