svn commit: r206163 - head/usr.sbin/services_mkdb

Hajimu UMEMOTO ume at FreeBSD.org
Sun Apr 4 15:21:10 UTC 2010


Author: ume
Date: Sun Apr  4 15:21:09 2010
New Revision: 206163
URL: http://svn.freebsd.org/changeset/base/206163

Log:
  Fix compilation error on amd64.
  
  Reported by:	stefanf
  MFC after:	2 weeks

Modified:
  head/usr.sbin/services_mkdb/services_mkdb.c

Modified: head/usr.sbin/services_mkdb/services_mkdb.c
==============================================================================
--- head/usr.sbin/services_mkdb/services_mkdb.c	Sun Apr  4 14:57:46 2010	(r206162)
+++ head/usr.sbin/services_mkdb/services_mkdb.c	Sun Apr  4 15:21:09 2010	(r206163)
@@ -219,7 +219,7 @@ parseservices(const char *fname, StringL
 
 	line = 0;
 	if ((svc = calloc(PMASK + 1, sizeof(StringList **))) == NULL)
-		err(1, "Cannot allocate %zu bytes", PMASK + 1);
+		err(1, "Cannot allocate %zu bytes", (size_t)(PMASK + 1));
 
 	/* XXX: change NULL to "\0\0#" when fparseln fixed */
 	for (; (p = fparseln(fp, &len, &line, NULL, 0)) != NULL; free(p)) {
@@ -271,7 +271,8 @@ parseservices(const char *fname, StringL
 		if (svc[pnum] == NULL) {
 			svc[pnum] = calloc(PROTOMAX, sizeof(StringList *));
 			if (svc[pnum] == NULL)
-				err(1, "Cannot allocate %zu bytes", PROTOMAX);
+				err(1, "Cannot allocate %zu bytes",
+				    (size_t)PROTOMAX);
 		}
 
 		pindex = getprotoindex(sl, proto);


More information about the svn-src-all mailing list