Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/chmod fix argument parsing.



details:   https://anonhg.NetBSD.org/src/rev/b88fe4199360
branches:  trunk
changeset: 782238:b88fe4199360
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Oct 22 18:00:46 2012 +0000

description:
fix argument parsing.

diffstat:

 bin/chmod/chmod.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e135e11e80fb -r b88fe4199360 bin/chmod/chmod.c
--- a/bin/chmod/chmod.c Mon Oct 22 17:47:06 2012 +0000
+++ b/bin/chmod/chmod.c Mon Oct 22 18:00:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chmod.c,v 1.37 2012/10/22 17:47:06 christos Exp $ */
+/* $NetBSD: chmod.c,v 1.38 2012/10/22 18:00:46 christos Exp $ */
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)chmod.c    8.8 (Berkeley) 4/1/94";
 #else
-__RCSID("$NetBSD: chmod.c,v 1.37 2012/10/22 17:47:06 christos Exp $");
+__RCSID("$NetBSD: chmod.c,v 1.38 2012/10/22 18:00:46 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -138,7 +138,7 @@
 done:  argv += optind;
        argc -= optind;
 
-       if (argc < 2 && (argc < 1 && reference == NULL))
+       if (argc == 0 || (argc == 1 && reference == NULL))
                usage();
 
        fts_options = FTS_PHYSICAL;



Home | Main Index | Thread Index | Old Index