From 2b766585f9b4ffabeef2f36200c275976b93f2c7 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Fri, 16 Nov 2012 19:13:11 +0530 Subject: printf should return negative value on error [BZ #11741] Fixed bug where printf and family may return a spurious success when printing padded formats. --- libio/libioP.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libio/libioP.h') diff --git a/libio/libioP.h b/libio/libioP.h index fe81115094..a402958b9c 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1997-2003,2004,2005,2006,2007,2012 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -167,7 +166,7 @@ typedef int (*_IO_pbackfail_t) (_IO_FILE *, int); #define _IO_WPBACKFAIL(FP, CH) WJUMP1 (__pbackfail, FP, CH) /* The 'xsputn' hook writes upto N characters from buffer DATA. - Returns the number of character actually written. + Returns EOF or the number of character actually written. It matches the streambuf::xsputn virtual function. */ typedef _IO_size_t (*_IO_xsputn_t) (_IO_FILE *FP, const void *DATA, _IO_size_t N); -- cgit v1.2.1