getopt32: remove opt_complementary
[oweals/busybox.git] / coreutils / chown.c
index 1bfc725cc2c4a4dff0e291cc13f1825fbb0fea4d..985d18d6f43b5a58d01e39c5a867c581ea2f2024 100644 (file)
@@ -55,7 +55,7 @@
 /* This is a NOEXEC applet. Be very careful! */
 
 
-#define OPT_STR     ("Rh" IF_DESKTOP("vcfLHP"))
+#define OPT_STR     "Rh" IF_DESKTOP("vcfLHP")
 #define BIT_RECURSE 1
 #define OPT_RECURSE (opt & 1)
 #define OPT_NODEREF (opt & 2)
@@ -128,10 +128,10 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
        struct param_t param;
 
 #if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
-       applet_long_options = chown_longopts;
+       opt = getopt32long(argv, "^" OPT_STR "\0" "=2", chown_longopts);
+#else
+       opt = getopt32(argv, "^" OPT_STR "\0" "=2");
 #endif
-       opt_complementary = "-2";
-       opt = getopt32(argv, OPT_STR);
        argv += optind;
 
        /* This matches coreutils behavior (almost - see below) */