*BSD News Article 19664


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!network.ucsd.edu!dog.ee.lbl.gov!overload.lbl.gov!agate!ames!cronkite.cisco.com!cisco.com!vandys
From: vandys@cisco.com (Andrew Valencia)
Newsgroups: comp.os.386bsd.bugs
Subject: fread return value
Date: 18 Aug 93 21:02:50 GMT
Organization: cisco Systems
Lines: 6
Message-ID: <vandys.745707770@cisco.com>
NNTP-Posting-Host: glare.cisco.com

The function fread(), when passed a size of 0 and nitems 1, will return
a value of 1.  Both my SunOS and System V systems return a 0 in the
same situation.  This tends to break the terminating condition of
some file processing loops.

						Andy