mirror of git://gcc.gnu.org/git/gcc.git
unix.c (buf_write): Return early if there is nothing to write.
2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org> * io/unix.c (buf_write): Return early if there is nothing to write. From-SVN: r250473
This commit is contained in:
parent
cedc228d1c
commit
ff9a87509d
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||||
|
|
||||||
|
* io/unix.c (buf_write): Return early if there is
|
||||||
|
nothing to write.
|
||||||
|
|
||||||
2017-06-09 Thomas Koenig <tkoenig@gcc.gnu.org>
|
2017-06-09 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||||
|
|
||||||
* intrinsics/eoshift2.c (eoshift2): Use memcpy
|
* intrinsics/eoshift2.c (eoshift2): Use memcpy
|
||||||
|
|
|
||||||
|
|
@ -582,6 +582,9 @@ buf_read (unix_stream *s, void *buf, ssize_t nbyte)
|
||||||
static ssize_t
|
static ssize_t
|
||||||
buf_write (unix_stream *s, const void *buf, ssize_t nbyte)
|
buf_write (unix_stream *s, const void *buf, ssize_t nbyte)
|
||||||
{
|
{
|
||||||
|
if (nbyte == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (s->ndirty == 0)
|
if (s->ndirty == 0)
|
||||||
s->buffer_offset = s->logical_offset;
|
s->buffer_offset = s->logical_offset;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue