duplicate code elimination

This commit is contained in:
Christian Grothoff 2020-01-19 15:38:44 +01:00
parent fdd8d602ba
commit 42ef95d002
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -124,20 +124,7 @@ TALER_TESTING_run_with_fakebank (struct TALER_TESTING_Interpreter *is,
struct TALER_TESTING_Command *commands, struct TALER_TESTING_Command *commands,
const char *bank_url) const char *bank_url)
{ {
const char *port; is->fakebank = TALER_TESTING_run_fakebank (bank_url);
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);
if (NULL == is->fakebank) if (NULL == is->fakebank)
{ {
GNUNET_break (0); GNUNET_break (0);