Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0803134 in mainline


Ignore:
Timestamp:
2011-07-23T02:15:16Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
1facf8e
Parents:
a701812
Message:

Fixed two latent bugs in fwrite() causing corrupted output after the first intervening flush.

File:
1 edited

Legend:

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

    ra701812 r0803134  
    594594                }
    595595               
    596                 buf += now;
     596                data += now;
    597597                stream->buf_head += now;
    598598                buf_free -= now;
    599599                bytes_left -= now;
    600600                total_written += now;
     601                stream->buf_state = _bs_write;
    601602               
    602603                if (buf_free == 0) {
     
    606607                }
    607608        }
    608        
    609         if (total_written > 0)
    610                 stream->buf_state = _bs_write;
    611609
    612610        if (need_flush)
Note: See TracChangeset for help on using the changeset viewer.