From: keie Date: Mon, 21 Jan 1985 23:58:07 +0000 (+0000) Subject: Printf does not return a truth value for failure. X-Git-Tag: release-5-5~5731 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7556180ab3ed518ae3aeee6125ef02eb611ce33c;p=ack.git Printf does not return a truth value for failure. These -incorrect- tests were replaced by calls to ferror. --- diff --git a/lang/basic/lib/write.c b/lang/basic/lib/write.c index 0796958ef..21a8858e1 100644 --- a/lang/basic/lib/write.c +++ b/lang/basic/lib/write.c @@ -19,14 +19,17 @@ int i; if(i>0) if( fputc(' ',_chanwr)==EOF) error(29); fprintf(_chanwr,"%d",i); + if( ferror(_chanwr) ) error(29); } _wrflt(f) double f; { - if( fprintf(_chanwr,"%f",f)== EOF) error(29); + fprintf(_chanwr,"%f",f); + if( ferror(_chanwr) ) error(29); } _wrstr(s) String *s; { - if( fprintf(_chanwr,"\"%s\"",s->strval)== EOF) error(29); + fprintf(_chanwr,"\"%s\"",s->strval); + if( ferror(_chanwr) ) error(29); }