@@ -643,23 +643,22 @@ void command_match(struct iptables_command_state *cs)
643643 return ;
644644 /* Merge options for non-cloned matches */
645645 {
646- bool merged = false;
647646 size_t merge_start = xs_longopts_count (opts , NULL );
648647
649648 if (m -> x6_options != NULL ) {
650649 opts = xtables_options_xfrm (xt_params -> orig_opts , opts ,
651650 m -> x6_options , & m -> option_offset );
652- merged = true;
653651 } else if (m -> extra_opts != NULL ) {
654652 opts = xtables_merge_options (xt_params -> orig_opts , opts ,
655653 m -> extra_opts , & m -> option_offset );
656- merged = true;
657- }
654+
655+ } else
656+ return ;
658657
659658 if (opts == NULL )
660659 xtables_error (OTHER_PROBLEM , "can't alloc memory!" );
661- if ( merged )
662- xs_validate_new_longopts (opts , merge_start ,
660+
661+ xs_validate_new_longopts (opts , merge_start ,
663662 m -> real_name != NULL ?
664663 m -> real_name : m -> name );
665664 }
@@ -723,19 +722,16 @@ void command_jump(struct iptables_command_state *cs)
723722 opts = xtables_options_xfrm (xt_params -> orig_opts , opts ,
724723 cs -> target -> x6_options ,
725724 & cs -> target -> option_offset );
726- merged = true;
727- } else if (cs -> target -> extra_opts != NULL ) {
728- opts = xtables_merge_options (xt_params -> orig_opts , opts ,
725+ else if (cs -> target -> extra_opts != NULL)
726+ opts = xtables_merge_options (xt_params -> orig_opts , opts ,
729727 cs -> target -> extra_opts ,
730728 & cs -> target -> option_offset );
731- merged = true;
732- }
733- if (opts == NULL )
734- xtables_error (OTHER_PROBLEM , "can't alloc memory!" );
735- if (merged )
736- xs_validate_new_longopts (opts , merge_start ,
737- cs -> target -> real_name != NULL ?
738- cs -> target -> real_name : cs -> jumpto );
739- }
729+ else
730+ return ;
731+ if (opts == NULL )
732+ xtables_error (OTHER_PROBLEM , "can't alloc memory!" );
733+ xs_validate_new_longopts (opts , merge_start ,
734+ cs -> target -> real_name != NULL ?
735+ cs -> target -> real_name : cs -> jumpto );
740736 xt_params -> opts = opts ;
741737}
0 commit comments