summaryrefslogtreecommitdiff
path: root/ctdb/protocol
diff options
context:
space:
mode:
authorSwen Schillig <swen@linux.ibm.com>2019-04-12 16:58:13 +0200
committerRalph Boehme <slow@samba.org>2019-06-30 11:32:18 +0000
commit73640b8ad8ced213d4855a2698df0d15318696ac (patch)
tree61cc4ef19ad9541a733cdcd10050d37613e324a4 /ctdb/protocol
parentb1c2f168ceff3e425462563fe5f73a655c77b47e (diff)
downloadsamba-73640b8ad8ced213d4855a2698df0d15318696ac.tar.gz
ctdb: 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 'ctdb/protocol')
-rw-r--r--ctdb/protocol/protocol_util.c10
1 files changed, 4 insertions, 6 deletions
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;
}