@@ -520,7 +520,7 @@ parse_addr(__unused struct in_addr *addr, __unused struct in_addr *net,
520520}
521521#endif
522522
523- static const char *
523+ static void
524524set_option_space (struct dhcpcd_ctx * ctx ,
525525 const char * arg ,
526526 const struct dhcp_opt * * d , size_t * dl ,
@@ -543,7 +543,7 @@ set_option_space(struct dhcpcd_ctx *ctx,
543543 * require = ifo -> requiremasknd ;
544544 * no = ifo -> nomasknd ;
545545 * reject = ifo -> rejectmasknd ;
546- return arg + strlen ( "nd_" ) ;
546+ return ;
547547 }
548548
549549#ifdef DHCP6
@@ -556,7 +556,7 @@ set_option_space(struct dhcpcd_ctx *ctx,
556556 * require = ifo -> requiremask6 ;
557557 * no = ifo -> nomask6 ;
558558 * reject = ifo -> rejectmask6 ;
559- return arg + strlen ( "dhcp6_" ) ;
559+ return ;
560560 }
561561#endif
562562#endif
@@ -576,7 +576,6 @@ set_option_space(struct dhcpcd_ctx *ctx,
576576 * require = ifo -> requiremask ;
577577 * no = ifo -> nomask ;
578578 * reject = ifo -> rejectmask ;
579- return arg ;
580579}
581580
582581void
@@ -806,7 +805,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
806805 break ;
807806 case 'o' :
808807 ARG_REQUIRED ;
809- arg = set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
808+ set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
810809 & request , & require , & no , & reject );
811810 if (make_option_mask (d , dl , od , odl , request , arg , 1 ) != 0 ||
812811 make_option_mask (d , dl , od , odl , no , arg , -1 ) != 0 ||
@@ -818,7 +817,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
818817 break ;
819818 case O_REJECT :
820819 ARG_REQUIRED ;
821- arg = set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
820+ set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
822821 & request , & require , & no , & reject );
823822 if (make_option_mask (d , dl , od , odl , reject , arg , 1 ) != 0 ||
824823 make_option_mask (d , dl , od , odl , request , arg , -1 ) != 0 ||
@@ -1053,7 +1052,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
10531052 break ;
10541053 case 'O' :
10551054 ARG_REQUIRED ;
1056- arg = set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
1055+ set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
10571056 & request , & require , & no , & reject );
10581057 if (make_option_mask (d , dl , od , odl , request , arg , -1 ) != 0 ||
10591058 make_option_mask (d , dl , od , odl , require , arg , -1 ) != 0 ||
@@ -1065,7 +1064,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
10651064 break ;
10661065 case 'Q' :
10671066 ARG_REQUIRED ;
1068- arg = set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
1067+ set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
10691068 & request , & require , & no , & reject );
10701069 if (make_option_mask (d , dl , od , odl , require , arg , 1 ) != 0 ||
10711070 make_option_mask (d , dl , od , odl , request , arg , 1 ) != 0 ||
@@ -1253,7 +1252,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
12531252 break ;
12541253 case O_DESTINATION :
12551254 ARG_REQUIRED ;
1256- arg = set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
1255+ set_option_space (ctx , arg , & d , & dl , & od , & odl , ifo ,
12571256 & request , & require , & no , & reject );
12581257 if (make_option_mask (d , dl , od , odl ,
12591258 ifo -> dstmask , arg , 2 ) != 0 )
0 commit comments