ctdb-tools: Update error check for new string conversion wrapper
[vlendec/samba-autobuild/.git] / ctdb / tools / ctdb.c
index 6b82bf779a92ba356d7affcf99391533e3c904f2..8db0ec8e7667cfe8936b052f1d1ca1aa09bba193 100644 (file)
@@ -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;
                        }