diff options
author | Swen Schillig <swen@linux.ibm.com> | 2019-03-06 09:48:24 +0100 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2019-04-11 22:29:27 +0000 |
commit | 6c1068ac00aca2c914e69dbd81532223180a5615 (patch) | |
tree | a789591ff933557908b45e71142f73b3f8ea7492 /ctdb | |
parent | c0c1004cd0946b9ead9b2441794dc9268af60fd8 (diff) | |
download | samba-6c1068ac00aca2c914e69dbd81532223180a5615.tar.gz |
ctdb-tools: Update error check for new string conversion wrapper
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>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/tools/ctdb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 6b82bf779a9..8db0ec8e766 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -325,10 +325,9 @@ static bool parse_nodestring(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, tok = strtok(ns, ","); while (tok != NULL) { uint32_t pnn; - char *endptr; - pnn = (uint32_t)strtoul_err(tok, &endptr, 0, &error); - if (error != 0 || (pnn == 0 && tok == endptr)) { + pnn = (uint32_t)strtoul_err(tok, NULL, 0, &error); + if (error != 0) { fprintf(stderr, "Invalid node %s\n", tok); return false; } |