]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix fwrite() to return 0 when size or nmemb are zero.
authored <ed@FreeBSD.org>
Sun, 12 Jul 2009 13:09:43 +0000 (13:09 +0000)
committered <ed@FreeBSD.org>
Sun, 12 Jul 2009 13:09:43 +0000 (13:09 +0000)
commit32d59587cd275dd8b0e8db80ddc997a52e0771fa
tree741c7d82471fa232d1d4175dea3bee1977667a58
parentd144bd09876b8dea20687370a97bed68d1e1dd5e
Fix fwrite() to return 0 when size or nmemb are zero.

Right now nmemb is returned when size is 0. In newer versions of the
standards, it is explicitly required that fwrite() should return 0.

Submitted by: Christoph Mallon
Approved by: re (kib)
lib/libc/stdio/fread.c
lib/libc/stdio/fwrite.c