getc() returns an int, not a char.

This commit is contained in:
thorpej 1997-04-19 06:33:13 +00:00
parent e612682b6c
commit b6c41d0d18

View File

@ -1,4 +1,4 @@
/* $NetBSD: displayq.c,v 1.8 1996/12/09 09:57:41 mrg Exp $ */ /* $NetBSD: displayq.c,v 1.9 1997/04/19 06:33:13 thorpej Exp $ */
/* /*
* Copyright (c) 1983, 1993 * Copyright (c) 1983, 1993
@ -89,7 +89,7 @@ displayq(format)
int format; int format;
{ {
register struct queue *q; register struct queue *q;
register int i, nitems, fd, ret; register int i, nitems, fd, ret, c;
register char *cp; register char *cp;
struct queue **queue; struct queue **queue;
struct stat statb; struct stat statb;
@ -163,7 +163,7 @@ displayq(format)
else { else {
/* get daemon pid */ /* get daemon pid */
cp = current; cp = current;
while ((*cp = getc(fp)) != EOF && *cp != '\n') while ((c = getc(fp)) != EOF && (*cp = c) != '\n')
cp++; cp++;
*cp = '\0'; *cp = '\0';
i = atoi(current); i = atoi(current);
@ -179,7 +179,8 @@ displayq(format)
} else { } else {
/* read current file name */ /* read current file name */
cp = current; cp = current;
while ((*cp = getc(fp)) != EOF && *cp != '\n') while ((c = getc(fp)) != EOF &&
(*cp = c) != '\n')
cp++; cp++;
*cp = '\0'; *cp = '\0';
/* /*