Try to make indent formatting less horrible
[oweals/busybox.git] / libbb / getopt_ulflags.c
index 9bf8c0559258a8646d8a6386c623758c93dd547f..04d1e669fed23f1d1378c1c29f88ff479e1a4af6 100644 (file)
@@ -90,7 +90,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
 
   va_start (p, applet_opts);
 
-  for (s = applet_opts; *s; s++) {
+  /* skip GNU extension */
+  s = applet_opts;
+  if(*s == '+' || *s == '-')
+       s++;
+
+  for (; *s; s++) {
        c++;
        while (s[1] == ':') {
            /* check GNU extension "o::" - optional arg */
@@ -99,7 +104,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
   }
   complementaly = xcalloc (c + 1, sizeof (t_complementaly));
   c = 0;
-  for (s = applet_opts; *s; s++) {
+  /* skip GNU extension */
+  s = applet_opts;
+  if(*s == '+' || *s == '-')
+       s++;
+
+  for (; *s; s++) {
        complementaly->opt = *s;
        complementaly->switch_on |= (1 << c);
        c++;