Properly indent a default: label and avoid crashing when running

under -v but cannot connect due to trying to print an int as %s [1].

Reported by:	andrew [1]
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2017-02-28 18:10:03 +00:00
parent 6414b02d0c
commit 6d91604093
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314396

View file

@ -153,7 +153,7 @@ fetch_syserr(void)
case EHOSTDOWN:
fetchLastErrCode = FETCH_DOWN;
break;
default:
default:
fetchLastErrCode = FETCH_UNKNOWN;
}
snprintf(fetchLastErrString, MAXERRSTRING, "%s", strerror(errno));
@ -371,7 +371,7 @@ fetch_connect(const char *host, int port, int af, int verbose)
}
if (err != 0) {
if (verbose)
fetch_info("failed to connect to %s:%s", host, port);
fetch_info("failed to connect to %s:%d", host, port);
goto syserr;
}