summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-09-14 13:00:10 +0200
committerwm4 <wm4@nowhere>2019-09-14 13:00:10 +0200
commit22568fece655500501e202fe53b49420e07d5fb6 (patch)
tree3609942ef3ec14693ef386eca4555348d2bbe45c /stream
parentbec218c4ad70d0eb1ae5a1d6a4455d9fd16bad0c (diff)
downloadmpv-22568fece655500501e202fe53b49420e07d5fb6.tar.bz2
mpv-22568fece655500501e202fe53b49420e07d5fb6.tar.xz
stream_file: remove unnecessary short write logic
See previous commit.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_file.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index 5d424d66d6..dd7bfba581 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -123,16 +123,7 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len)
static int write_buffer(stream_t *s, char *buffer, int len)
{
struct priv *p = s->priv;
- int r = len;
- int wr;
- while (r > 0) {
- wr = write(p->fd, buffer, r);
- if (wr <= 0)
- return -1;
- r -= wr;
- buffer += wr;
- }
- return len - r;
+ return write(p->fd, buffer, len);
}
static int seek(stream_t *s, int64_t newpos)