Date: Fri, 16 Oct 1998 12:17:14 -0700 (PDT) From: Doug White <dwhite@resnet.uoregon.edu> To: Geoffrey Robinson <geoffr@globalserve.net> Cc: questions@FreeBSD.ORG Subject: Re: Interrupted System Calls Infinite Loop Message-ID: <Pine.BSF.4.03.9810161215200.28399-100000@resnet.uoregon.edu> In-Reply-To: <3622B97D.C04E46C2@globalserve.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 Oct 1998, Geoffrey Robinson wrote: > error_handle = fread(&sizerec,1,sizeof(struct size_record),fp2); Um, I think your 2nd and 3rd arguments are reversed. Trying to read sizeof(struct size_record), 1 byte objects? Don't you mean: fread(&sizerec, sizeof(struct size_record),1,fp2); to read one record? Ye Olde Fread(3) says: SYNOPSIS fread(void *ptr, size_t size, size_t nmemb, FILE *stream) DESCRIPTION The function fread() reads nmemb objects, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr. Doug White Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve http://gladstone.uoregon.edu/~dwhite | www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.03.9810161215200.28399-100000>