ntpd: default to FEATURE_NTP_AUTH=y
[oweals/busybox.git] / editors / patch_bbox.c
index 78aa5fde8a34c705c7e88ff111dc956a7d19b87b..8e09ef4888b667b307fdf30df85d5d8812f3d11b 100644 (file)
@@ -111,10 +111,9 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
                        "no-backup-if-mismatch\0" No_argument       "\xff" /*ignored*/
 # endif
                        ;
-               applet_long_options = patch_longopts;
 #endif
                /* -f,-E,-g are ignored */
-               opt = getopt32(argv, "p:i:RN""fEg:", &p, &i, NULL);
+               opt = getopt32long(argv, "p:i:RN""fEg:", patch_longopts, &p, &i, NULL);
                if (opt & OPT_R)
                        plus = '-';
                patch_level = xatoi(p); /* can be negative! */
@@ -188,8 +187,8 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
                        unsigned src_last_line = 1;
                        unsigned dst_last_line = 1;
 
-                       if ((sscanf(patch_line, "@@ -%d,%d +%d,%d", &src_beg_line, &src_last_line, &dst_beg_line, &dst_last_line) < 3)
-                        && (sscanf(patch_line, "@@ -%d +%d,%d", &src_beg_line, &dst_beg_line, &dst_last_line) < 2)
+                       if ((sscanf(patch_line, "@@ -%u,%u +%u,%u", &src_beg_line, &src_last_line, &dst_beg_line, &dst_last_line) < 3)
+                        && (sscanf(patch_line, "@@ -%u +%u,%u", &src_beg_line, &dst_beg_line, &dst_last_line) < 2)
                        ) {
                                /* No more hunks for this file */
                                break;