From: Martin Schwenke Date: Tue, 21 Jun 2016 04:49:28 +0000 (+1000) Subject: ctdb-tests: Drop CTDB_TEST_MAX_IPS X-Git-Tag: tdb-1.3.10~559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=067a611c7d469c45d4a7a756945921c8d2deb107;p=thirdparty%2Fsamba.git ctdb-tests: Drop CTDB_TEST_MAX_IPS Arrays are now dynamically reallocated. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/src/ctdb_takeover_tests.c b/ctdb/tests/src/ctdb_takeover_tests.c index 151ccd26ab4..e15b49dac18 100644 --- a/ctdb/tests/src/ctdb_takeover_tests.c +++ b/ctdb/tests/src/ctdb_takeover_tests.c @@ -23,7 +23,6 @@ /* This is lazy... but it is test code! */ #define CTDB_TEST_MAX_NODES 256 -#define CTDB_TEST_MAX_IPS 1024 static void print_ctdb_public_ip_list(struct public_ip_list * ips) { @@ -65,7 +64,7 @@ read_ctdb_public_ip_info(TALLOC_CTX *ctx , char line[1024]; ctdb_sock_addr addr; char *t, *tok; - int pnn, numips, n; + int pnn, n; struct ctdb_public_ip_list * k; enum ctdb_runstate *runstate; @@ -81,7 +80,6 @@ read_ctdb_public_ip_info(TALLOC_CTX *ctx , k = talloc_zero(ctx, struct ctdb_public_ip_list); assert(k != NULL); - numips = 0; while (fgets(line, sizeof(line), stdin) != NULL) { /* Get rid of pesky newline */ @@ -106,12 +104,6 @@ read_ctdb_public_ip_info(TALLOC_CTX *ctx , continue; } - numips++; - if (numips > CTDB_TEST_MAX_IPS) { - DEBUG(DEBUG_ERR, ("ERROR: Exceeding CTDB_TEST_MAX_IPS: %d\n", CTDB_TEST_MAX_IPS)); - exit(1); - } - /* Get the PNN */ pnn = -1; tok = strtok(NULL, " \t");