diff options
author | Swen Schillig <swen@linux.ibm.com> | 2019-06-04 09:06:37 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-06-30 11:32:18 +0000 |
commit | 3bc973c6022ee79f57459849bc5c104795897fde (patch) | |
tree | 9d0bdc027cacf3fa91b6aafcbd5ef31d7578d407 /source4/lib | |
parent | a75727f191c53ca358cdef930b75d169793f59a3 (diff) | |
download | samba-3bc973c6022ee79f57459849bc5c104795897fde.tar.gz |
source4: 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 'source4/lib')
-rw-r--r-- | source4/lib/registry/ldb.c | 12 | ||||
-rw-r--r-- | source4/lib/socket/interface.c | 9 |
2 files changed, 16 insertions, 5 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index d0e9f46f4e1..c0b13e0d4ce 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -79,7 +79,11 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, /* The data is a plain DWORD */ uint32_t tmp; - tmp = strtoul_err((char *)val->data, NULL, 0, &error); + tmp = smb_strtoul((char *)val->data, + NULL, + 0, + &error, + SMB_STR_STANDARD); if (error != 0) { data->data = NULL; data->length = 0; @@ -102,7 +106,11 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, /* The data is a plain QWORD */ uint64_t tmp; - tmp = strtoull_err((char *)val->data, NULL, 0, &error); + tmp = smb_strtoull((char *)val->data, + NULL, + 0, + &error, + SMB_STR_STANDARD); if (error != 0) { data->data = NULL; data->length = 0; diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c index 9bf002c2f01..93b60f7d32f 100644 --- a/source4/lib/socket/interface.c +++ b/source4/lib/socket/interface.c @@ -224,11 +224,14 @@ static void interpret_interface(TALLOC_CTX *mem_ctx, return; } } else { - char *endp = NULL; int error = 0; - unsigned long val = strtoul_err(p, &endp, 0, &error); - if (error != 0 || *endp != '\0') { + unsigned long 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)); |