Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcso!hpldola!hp-lsd!davek From: davek@hp-lsd.COS.HP.COM (Dave Kumpf) Newsgroups: comp.lang.c Subject: Re: comp.lang.c Message-ID: <8010003@hp-lsd.COS.HP.COM> Date: 28 Aug 89 21:35:03 GMT References: <744@oucsace.cs.OHIOU.EDU> Organization: HP Logic Systems Division - ColoSpgs, CO Lines: 13 How about: while ((rtns = fread(buf,5,10,ioptr)) == 10) (i.e. fread, store return value in rtns, then compare it to 10) Your version compares the result of the fread to 10 and stores the result in rtns (either 1 or 0). (I think.) Dave Kumpf hplabs!hp-lsd!davek