SCCS-vsn: usr.bin/more/ch.c 5.4
-static char sccsid[] = "@(#)ch.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)ch.c 5.4 (Berkeley) %G%";
+ (void)lseek(file, pos, L_SET);
* If we don't have ANY, then quit.
* Otherwise, just report the error and return.
*/
* If we don't have ANY, then quit.
* Otherwise, just report the error and return.
*/
- sprintf(message, "cannot allocate %d buffers",
+ (void)sprintf(message, "cannot allocate %d buffers",
want_nbufs - nbufs);
error(message);
if (nbufs == 0)
want_nbufs - nbufs);
error(message);
if (nbufs == 0)
* We don't have enough buffers.
* Allocate some new ones.
*/
* We don't have enough buffers.
* Allocate some new ones.
*/
- newbufs = (struct buf *) calloc(nnew, sizeof(struct buf));
+ newbufs = (struct buf *) calloc((u_int)nnew, sizeof(struct buf));
if (newbufs == NULL)
return (1);
if (newbufs == NULL)
return (1);