summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/strtofflags.c
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2000-06-17 01:43:56 +0000
committerjoe <joe@FreeBSD.org>2000-06-17 01:43:56 +0000
commitaf432f252ad14b44f8e6262bc3bc32b902774708 (patch)
tree755e9ba7136f3467a7b98a5f4ddf3122bd090db6 /lib/libc/gen/strtofflags.c
parent27d76a0d0fc67fafb473a28b631653cc5913e873 (diff)
downloadFreeBSD-src-af432f252ad14b44f8e6262bc3bc32b902774708.zip
FreeBSD-src-af432f252ad14b44f8e6262bc3bc32b902774708.tar.gz
The "def" arg for fflagstostr is too specialized for ls. The caller
can easily translate from "" to whatever it wants to print if no flags are set. (ls prints "-" and mtree prints "none".) Suggested by: bde
Diffstat (limited to 'lib/libc/gen/strtofflags.c')
-rw-r--r--lib/libc/gen/strtofflags.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c
index 2cf6f39..d9d2dc4 100644
--- a/lib/libc/gen/strtofflags.c
+++ b/lib/libc/gen/strtofflags.c
@@ -76,12 +76,11 @@ static struct {
/*
* fflagstostr --
* Convert file flags to a comma-separated string. If no flags
- * are set, return the default string.
+ * are set, return the empty string.
*/
char *
-fflagstostr(flags, def)
+fflagstostr(flags)
u_long flags;
- char *def;
{
static char string[128];
char *sp, *dp;
@@ -100,7 +99,7 @@ fflagstostr(flags, def)
}
}
*dp = '\0';
- return (dp == string && def != NULL ? def : string);
+ return (string);
}
/*
OpenPOWER on IntegriCloud