summaryrefslogtreecommitdiff
path: root/source3/lib/interface.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@linux.ibm.com>2019-06-04 09:04:15 +0200
committerRalph Boehme <slow@samba.org>2019-06-30 11:32:18 +0000
commita75727f191c53ca358cdef930b75d169793f59a3 (patch)
tree86c58f95cad32a1a72f32a7eb328a35704d3126f /source3/lib/interface.c
parentbf020a8c8db6bb6a0386d3bf69d40116601b1aca (diff)
downloadsamba-a75727f191c53ca358cdef930b75d169793f59a3.tar.gz
source3: Update all consumers of strtoul_err(), strtoull_err() to new API
Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3/lib/interface.c')
-rw-r--r--source3/lib/interface.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index 31066b8b5cc..af81695abab 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -370,7 +370,11 @@ static void parse_extra_info(char *key, uint64_t *speed, uint32_t *cap,
*val++ = 0;
if (strequal_m(key, "speed")) {
- *speed = (uint64_t)strtoull_err(val, NULL, 0, &error);
+ *speed = (uint64_t)smb_strtoull(val,
+ NULL,
+ 0,
+ &error,
+ SMB_STR_STANDARD);
if (error != 0) {
DBG_DEBUG("Invalid speed value (%s)\n", val);
}
@@ -384,7 +388,11 @@ static void parse_extra_info(char *key, uint64_t *speed, uint32_t *cap,
"'%s'\n", val);
}
} else if (strequal_m(key, "if_index")) {
- *if_index = (uint32_t)strtoul_err(val, NULL, 0, &error);
+ *if_index = (uint32_t)smb_strtoul(val,
+ NULL,
+ 0,
+ &error,
+ SMB_STR_STANDARD);
if (error != 0) {
DBG_DEBUG("Invalid key value (%s)\n", val);
}
@@ -523,11 +531,10 @@ static void interpret_interface(char *token)
}
} else {
int error = 0;
- char *endp = NULL;
unsigned long val;
- val = strtoul_err(p, &endp, 0, &error);
- if (error != 0 || *endp != '\0') {
+ val = smb_strtoul(p, NULL, 0, &error, SMB_STR_FULL_STR_CONV);
+ if (error != 0) {
DEBUG(2,("interpret_interface: "
"can't determine netmask value from %s\n",
p));