do not strcmp NULL (just take it out of the table entirely)
authorChris Torek <torek@ucbvax.Berkeley.EDU>
Thu, 22 Aug 1991 07:43:34 +0000 (23:43 -0800)
committerChris Torek <torek@ucbvax.Berkeley.EDU>
Thu, 22 Aug 1991 07:43:34 +0000 (23:43 -0800)
SCCS-vsn: usr.bin/find/option.c 5.10

usr/src/usr.bin/find/option.c

index fa17ede..04ec862 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)option.c   5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)option.c   5.10 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -31,6 +31,7 @@ typedef struct _option {
        int flags;
 } OPTION;
 
        int flags;
 } OPTION;
 
+/* NB: the following table must be sorted in machine (strcmp) order */
 OPTION options[] = {
        "!",            N_NOT,          c_not,          O_ZERO,
        "(",            N_OPENPAREN,    c_openparen,    O_ZERO,
 OPTION options[] = {
        "!",            N_NOT,          c_not,          O_ZERO,
        "(",            N_OPENPAREN,    c_openparen,    O_ZERO,
@@ -63,7 +64,6 @@ OPTION options[] = {
        "-type",        N_TYPE,         c_type,         O_ARGV,
        "-user",        N_USER,         c_user,         O_ARGV,
        "-xdev",        N_XDEV,         c_xdev,         O_ZERO,
        "-type",        N_TYPE,         c_type,         O_ARGV,
        "-user",        N_USER,         c_user,         O_ARGV,
        "-xdev",        N_XDEV,         c_xdev,         O_ZERO,
-       { NULL },
 };
 
 /*
 };
 
 /*