From 42ef95d002637150bbb294d2e4e69504b2b7bb7c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Jan 2020 15:38:44 +0100 Subject: duplicate code elimination --- src/testing/testing_api_loop.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/testing') diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index a7a5a23a4..61b95c2e1 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c @@ -124,20 +124,7 @@ TALER_TESTING_run_with_fakebank (struct TALER_TESTING_Interpreter *is, struct TALER_TESTING_Command *commands, const char *bank_url) { - const char *port; - long pnum; - - port = strrchr (bank_url, - (unsigned char) ':'); - if (NULL == port) - pnum = 80; - else - pnum = strtol (port + 1, NULL, 10); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Starting Fakebank on port %u (%s)\n", - (unsigned int) pnum, - bank_url); - is->fakebank = TALER_FAKEBANK_start ((uint16_t) pnum); + is->fakebank = TALER_TESTING_run_fakebank (bank_url); if (NULL == is->fakebank) { GNUNET_break (0); -- cgit v1.2.3