Changeset 7db5cfd in mainline


Ignore:
Timestamp:
2015-09-21T21:59:56Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
80bee81
Parents:
c70703a
Message:

fputs() and the incredible adventures of its return value.

Location:
uspace/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/io.c

    rc70703a r7db5cfd  
    624624int fputs(const char *str, FILE *stream)
    625625{
    626         return fwrite(str, str_size(str), 1, stream);
     626        (void) fwrite(str, str_size(str), 1, stream);
     627        if (ferror(stream))
     628                return EOF;
     629        return 0;
    627630}
    628631
  • uspace/lib/posix/source/stdio.c

    rc70703a r7db5cfd  
    101101int posix_fputs(const char *restrict s, FILE *restrict stream)
    102102{
    103         int rc = fputs(s, stream);
    104         if (rc == 0) {
    105                 return EOF;
    106         } else {
    107                 return 0;
    108         }
     103        return fputs(s, stream);
    109104}
    110105
Note: See TracChangeset for help on using the changeset viewer.