mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-25 20:38:36 +00:00
Tidy parsing code.
This commit is contained in:
1 parent
4b6af5d53f
commit
407a1f3e95
1 file changed
+3
-12
+3
-12
@@ -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,13 +3903,8 @@ 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))
|
||||||
{
|
ret_err(_("invalid weight"));
|
||||||
arg = comma;
|
|
||||||
comma = split(arg);
|
|
||||||
if (!atoi_check16(arg, &weight))
|
|
||||||
ret_err(_("invalid weight"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user