Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2017 18:10:04 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314396 - head/lib/libfetch
Message-ID:  <201702281810.v1SIA4Nd068348@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Tue Feb 28 18:10:03 2017
New Revision: 314396
URL: https://svnweb.freebsd.org/changeset/base/314396

Log:
  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

Modified:
  head/lib/libfetch/common.c

Modified: head/lib/libfetch/common.c
==============================================================================
--- head/lib/libfetch/common.c	Tue Feb 28 16:20:33 2017	(r314395)
+++ head/lib/libfetch/common.c	Tue Feb 28 18:10:03 2017	(r314396)
@@ -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
 	}
 	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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702281810.v1SIA4Nd068348>