svn commit: r243201 - head/usr.bin/locale

Greg Lehey grog at FreeBSD.org
Sat Nov 17 23:49:20 UTC 2012


Author: grog
Date: Sat Nov 17 23:49:20 2012
New Revision: 243201
URL: http://svnweb.freebsd.org/changeset/base/243201

Log:
  Correctly handle keywords without options.
  
  Reported by: swills@
  MFC after:	14 days

Modified:
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.c
==============================================================================
--- head/usr.bin/locale/locale.c	Sat Nov 17 23:44:01 2012	(r243200)
+++ head/usr.bin/locale/locale.c	Sat Nov 17 23:49:20 2012	(r243201)
@@ -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) {


More information about the svn-src-head mailing list