From owner-cvs-all Fri Oct 9 03:33:51 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA05986 for cvs-all-outgoing; Fri, 9 Oct 1998 03:33:51 -0700 (PDT) (envelope-from owner-cvs-all) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA05978; Fri, 9 Oct 1998 03:33:48 -0700 (PDT) (envelope-from des@FreeBSD.org) From: "Dag-Erling C. Sm\xf8rgrav" Received: (from des@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id DAA01184; Fri, 9 Oct 1998 03:33:47 -0700 (PDT) Date: Fri, 9 Oct 1998 03:33:47 -0700 (PDT) Message-Id: <199810091033.DAA01184@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/usr.bin/head head.c Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk des 1998/10/09 03:33:46 PDT Modified files: usr.bin/head head.c Log: fread() returns 0 on eof or error, not EOF. This fixes the following bug: "head -c " never exit and loops forever (until it is killed), if the input stream has fewer bytes than specified (n). PR: bin/8225 Submitted-by: FUJIMOTO Kensaku Revision Changes Path 1.9 +2 -2 src/usr.bin/head/head.c