From 73640b8ad8ced213d4855a2698df0d15318696ac Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Fri, 12 Apr 2019 16:58:13 +0200 Subject: ctdb: Update all consumers of strtoul_err(), strtoull_err() to new API Signed-off-by: Swen Schillig Reviewed-by: Ralph Boehme Reviewed-by: Christof Schmitt --- ctdb/protocol/protocol_util.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ctdb/protocol') diff --git a/ctdb/protocol/protocol_util.c b/ctdb/protocol/protocol_util.c index f43afbc58d0..2a0d42a9f45 100644 --- a/ctdb/protocol/protocol_util.c +++ b/ctdb/protocol/protocol_util.c @@ -270,7 +270,6 @@ int ctdb_sock_addr_from_string(const char *str, char *p; char s[64]; /* Much longer than INET6_ADDRSTRLEN */ unsigned port; - char *endp = NULL; size_t len; int ret; @@ -291,8 +290,8 @@ int ctdb_sock_addr_from_string(const char *str, return EINVAL; } - port = strtoul_err(p+1, &endp, 10, &ret); - if (ret != 0 || *endp != '\0') { + port = smb_strtoul(p+1, NULL, 10, &ret, SMB_STR_FULL_STR_CONV); + if (ret != 0) { /* Empty string or trailing garbage */ return EINVAL; } @@ -312,7 +311,6 @@ int ctdb_sock_addr_mask_from_string(const char *str, char *p; char s[64]; /* Much longer than INET6_ADDRSTRLEN */ unsigned int m; - char *endp = NULL; ssize_t len; int ret = 0; @@ -330,8 +328,8 @@ int ctdb_sock_addr_mask_from_string(const char *str, return EINVAL; } - m = strtoul_err(p+1, &endp, 10, &ret); - if (ret != 0 || *endp != '\0') { + m = smb_strtoul(p+1, NULL, 10, &ret, SMB_STR_FULL_STR_CONV); + if (ret != 0) { /* Empty string or trailing garbage */ return EINVAL; } -- cgit v1.2.1