summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index a8dcf8fbdb..87e77d7bf3 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -63,10 +63,7 @@ static int write_buffer(stream_t *s, char *buffer, int len)
static int seek(stream_t *s, int64_t newpos)
{
struct priv *p = s->priv;
- s->pos = newpos;
- if (lseek(p->fd, s->pos, SEEK_SET) < 0)
- return 0;
- return 1;
+ return lseek(p->fd, newpos, SEEK_SET) != (off_t)-1;
}
static int control(stream_t *s, int cmd, void *arg)