From 32053042d4785ffeae3a032808480c8dc2f98607 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Sep 2005 16:36:09 +0000 Subject: [BZ #394] 2005-09-23 Ulrich Drepper [BZ #394] * libio/fmemopen.c (fmemopen_write): Return 0 instead of -1 if nothing can be written. * libio/iofopncook.c (_IO_cookie_write): If something went wrong, set error bit. --- libio/fmemopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libio/fmemopen.c') diff --git a/libio/fmemopen.c b/libio/fmemopen.c index 7c8769a130..b847f62c9a 100644 --- a/libio/fmemopen.c +++ b/libio/fmemopen.c @@ -127,7 +127,7 @@ fmemopen_write (void *cookie, const char *b, size_t s) if ((size_t) (c->pos + addnullc) == c->size) { __set_errno (ENOSPC); - return -1; + return 0; } s = c->size - c->pos - addnullc; } -- cgit 1.4.1