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>
}
port = strtoul_err(p+1, &endp, 10, &ret);
- if (endp == p+1 || *endp != '\0' || ret != 0) {
+ if (ret != 0 || *endp != '\0') {
/* Empty string or trailing garbage */
return EINVAL;
}
}
m = strtoul_err(p+1, &endp, 10, &ret);
- if (endp == p+1 || *endp != '\0' || ret != 0) {
+ if (ret != 0 || *endp != '\0') {
/* Empty string or trailing garbage */
return EINVAL;
}