summaryrefslogtreecommitdiffstats
path: root/usr.bin/locale/locale.c
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2012-11-17 23:49:20 +0000
committergrog <grog@FreeBSD.org>2012-11-17 23:49:20 +0000
commit2e5b9af6e5318760efe3d402edbbaa06ddd53d2b (patch)
tree874fce811fbf61faf9df83f69617a1f1e73ff217 /usr.bin/locale/locale.c
parent4002468097ee2af4e24da88a43ca4d831ed97ead (diff)
downloadFreeBSD-src-2e5b9af6e5318760efe3d402edbbaa06ddd53d2b.zip
FreeBSD-src-2e5b9af6e5318760efe3d402edbbaa06ddd53d2b.tar.gz
Correctly handle keywords without options.
Reported by: swills@ MFC after: 14 days
Diffstat (limited to 'usr.bin/locale/locale.c')
-rw-r--r--usr.bin/locale/locale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/locale/locale.c b/usr.bin/locale/locale.c
index 85e6d7f..ee9bf84 100644
--- a/usr.bin/locale/locale.c
+++ b/usr.bin/locale/locale.c
@@ -279,8 +279,8 @@ main(int argc, char *argv[])
exit(0);
}
- /* process '-c' and/or '-k' */
- if (prt_categories || prt_keywords) {
+ /* process '-c', '-k', or command line arguments. */
+ if (prt_categories || prt_keywords || argc > 0) {
if (argc > 0) {
setlocale(LC_ALL, "");
while (argc > 0) {
OpenPOWER on IntegriCloud