Fix compilation error on amd64.

Reported by:	stefanf
MFC after:	2 weeks
This commit is contained in:
Hajimu UMEMOTO 2010-04-04 15:21:09 +00:00
parent 0e9bd4171f
commit 449c161202

View File

@ -219,7 +219,7 @@ parseservices(const char *fname, StringList *sl)
line = 0; line = 0;
if ((svc = calloc(PMASK + 1, sizeof(StringList **))) == NULL) 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 */ /* XXX: change NULL to "\0\0#" when fparseln fixed */
for (; (p = fparseln(fp, &len, &line, NULL, 0)) != NULL; free(p)) { for (; (p = fparseln(fp, &len, &line, NULL, 0)) != NULL; free(p)) {
@ -271,7 +271,8 @@ parseservices(const char *fname, StringList *sl)
if (svc[pnum] == NULL) { if (svc[pnum] == NULL) {
svc[pnum] = calloc(PROTOMAX, sizeof(StringList *)); svc[pnum] = calloc(PROTOMAX, sizeof(StringList *));
if (svc[pnum] == NULL) if (svc[pnum] == NULL)
err(1, "Cannot allocate %zu bytes", PROTOMAX); err(1, "Cannot allocate %zu bytes",
(size_t)PROTOMAX);
} }
pindex = getprotoindex(sl, proto); pindex = getprotoindex(sl, proto);