hust testsuite: fix a false positive
[oweals/busybox.git] / debianutils / run_parts.c
index 13617c6e16195022443a43211e38e4946926a5ca..0bb666abc9a234d18a37c71ec27fe3aa7297e352 100644 (file)
 //usage:       "+ shutdown -h +4m"
 
 #include "libbb.h"
+#include "common_bufsiz.h"
 
 struct globals {
        char **names;
        int    cur;
        char  *cmd[2 /* using 1 provokes compiler warning */];
 } FIX_ALIASING;
-#define G (*(struct globals*)&bb_common_bufsiz1)
+#define G (*(struct globals*)bb_common_bufsiz1)
 #define names (G.names)
 #define cur   (G.cur  )
 #define cmd   (G.cmd  )
-#define INIT_G() do { } while (0)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
 
 enum { NUM_CMD = (COMMON_BUFSIZE - sizeof(G)) / sizeof(cmd[0]) - 1 };
 
@@ -180,8 +181,8 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
        applet_long_options = runparts_longopts;
 #endif
        /* We require exactly one argument: the directory name */
-       opt_complementary = "=1:a::";
-       getopt32(argv, "a:u:", &arg_list, &umask_p);
+       opt_complementary = "=1";
+       getopt32(argv, "a:*u:", &arg_list, &umask_p);
 
        umask(xstrtou_range(umask_p, 8, 0, 07777));