getopt32: remove opt_complementary
[oweals/busybox.git] / procps / watch.c
index 2bb7cca90fd7be5d6a13f51115af6f10d055f73f..6fc9f7db7794b1e0b9aec6d6b90ffc02b6ce67d1 100644 (file)
@@ -62,9 +62,9 @@ int watch_main(int argc UNUSED_PARAM, char **argv)
        xopen("/dev/null", O_RDONLY);
 #endif
 
-       opt_complementary = "-1"; // at least one param; -n NUM
-       // "+": stop at first non-option (procps 3.x only)
-       opt = getopt32(argv, "+dtn:+", &period);
+       // "+": stop at first non-option (procps 3.x only); -n NUM
+       // at least one param
+       opt = getopt32(argv, "^+" "dtn:+" "\0" "-1", &period);
        argv += optind;
 
        // watch from both procps 2.x and 3.x does concatenation. Example: