Commit 407a1f3e authored by Simon Kelley's avatar Simon Kelley

Tidy parsing code.

parent 4b6af5d5
...@@ -1990,11 +1990,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -1990,11 +1990,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
comma = split(arg); comma = split(arg);
daemon->soa_retry = (u32)atoi(arg); daemon->soa_retry = (u32)atoi(arg);
if (comma) if (comma)
{ daemon->soa_expiry = (u32)atoi(comma);
arg = comma;
comma = split(arg);
daemon->soa_expiry = (u32)atoi(arg);
}
} }
} }
} }
...@@ -3907,16 +3903,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -3907,16 +3903,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
if (!atoi_check16(arg, &priority)) if (!atoi_check16(arg, &priority))
ret_err(_("invalid priority")); ret_err(_("invalid priority"));
if (comma) if (comma && !atoi_check16(comma, &weight))
{
arg = comma;
comma = split(arg);
if (!atoi_check16(arg, &weight))
ret_err(_("invalid weight")); ret_err(_("invalid weight"));
} }
} }
} }
}
new = opt_malloc(sizeof(struct mx_srv_record)); new = opt_malloc(sizeof(struct mx_srv_record));
new->next = daemon->mxnames; new->next = daemon->mxnames;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment