Changeset 58daded in mainline


Ignore:
Timestamp:
2018-07-16T09:13:43Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
802a8c8
Parents:
0245896
git-author:
Jiri Svoboda <jiri@…> (2018-07-16 06:12:46)
git-committer:
Jiri Svoboda <jiri@…> (2018-07-16 09:13:43)
Message:

setvbuf should return an integer.

Location:
uspace/lib/c
Files:
2 edited

Legend:

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

    r0245896 r58daded  
    242242
    243243/** Set stream buffer. */
    244 void setvbuf(FILE *stream, void *buf, int mode, size_t size)
    245 {
     244int setvbuf(FILE *stream, void *buf, int mode, size_t size)
     245{
     246        if (mode != _IONBF && mode != _IOLBF && mode != _IOFBF)
     247                return -1;
     248
    246249        stream->btype = mode;
    247250        stream->buf = buf;
     
    250253        stream->buf_tail = stream->buf;
    251254        stream->buf_state = _bs_empty;
     255
     256        return 0;
    252257}
    253258
  • uspace/lib/c/include/stdio.h

    r0245896 r58daded  
    170170extern void perror(const char *);
    171171
    172 extern void setvbuf(FILE *, void *, int, size_t);
     172extern int setvbuf(FILE *, void *, int, size_t);
    173173extern void setbuf(FILE *, void *);
    174174
Note: See TracChangeset for help on using the changeset viewer.