fwrite(buf, 0, 42, stream) == ?
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Jun 27 21:42:52 AEST 1990
In article <6818 at scolex.sco.COM> seanf at sco.COM (Sean Fagan) writes:
>How many bytes get written for a 0-sized object?
There are no 0-sized objects. Therefore the implementation may do what
it wants in this case. I would suggest returning 0, which is not only
a technically correct answer (any nonnegative integer from 0 through
the number of records requested would be correct), but is also most
useful in detecting this misusage during software development.
More information about the Comp.std.c
mailing list