svn commit: r314396 - head/lib/libfetch

Bjoern A. Zeeb bz at FreeBSD.org
Tue Feb 28 18:10:05 UTC 2017


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;
 	}
 


More information about the svn-src-all mailing list