]> The Tcpdump Group git mirrors - tcpdump/blobdiff - missing/getopt_long.c
CHANGES: remove from the main-only list a change now in 4.99.2. [skip ci]
[tcpdump] / missing / getopt_long.c
index 5018400ed0e41d5c09b42323f8958b08ba56d0de..927028ffc34d75a61aa02f326d8632dda50a71e8 100644 (file)
@@ -565,11 +565,11 @@ start:
                        ++optind;
        } else {                                /* takes (optional) argument */
                optarg = NULL;
                        ++optind;
        } else {                                /* takes (optional) argument */
                optarg = NULL;
+               if (*place) {                   /* no white space */
 DIAG_OFF_CAST_QUAL
 DIAG_OFF_CAST_QUAL
-               if (*place)                     /* no white space */
                        optarg = (char *)place;
 DIAG_ON_CAST_QUAL
                        optarg = (char *)place;
 DIAG_ON_CAST_QUAL
-               else if (oli[1] != ':') {       /* arg not optional */
+               } else if (oli[1] != ':') {     /* arg not optional */
                        if (++optind >= nargc) {        /* no arg */
                                place = EMSG;
                                if (PRINT_ERROR)
                        if (++optind >= nargc) {        /* no arg */
                                place = EMSG;
                                if (PRINT_ERROR)