summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
Diffstat (limited to 'zaptel.c')
-rw-r--r--zaptel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zaptel.c b/zaptel.c
index c43db21..1ffded1 100644
--- a/zaptel.c
+++ b/zaptel.c
@@ -1811,7 +1811,7 @@ static ssize_t zt_chan_read(struct file *file, char *usrbuf, size_t count, int u
chan->readidx[res] = 0;
chan->readn[res] = 0;
oldbuf = res;
- res = (chan->outreadbuf + 1) % chan->numbufs;
+ chan->outreadbuf = (res + 1) % chan->numbufs;
if (chan->outreadbuf == chan->inreadbuf) {
/* Out of stuff */
chan->outreadbuf = -1;