The new string conversion wrappers detect and flag errors
which occured during the string to integer conversion.
Those modifications required an update of the callees
error checks.
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
goto error;
}
- if (*endptr != '\0' || endptr == slash + 1 || error != 0){
+ if (error != 0 || *endptr != '\0'){
DBG_INFO("CIDR mask is not a proper integer: %s\n", cidr);
goto error;
}
int error = 0;
unsigned long val = strtoul_err(p, &endp, 0, &error);
- if (p == endp || (endp && *endp != '\0') || error != 0) {
+ if (error != 0 || *endp != '\0') {
DEBUG(2,("interpret_interface: "
"can't determine netmask value from %s\n",
p));