Changeset 58daded in mainline for uspace/lib/c/generic/io/io.c


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.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.