From c9c4f4cda362679567bc4bc04ffedc5d984e2329 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 18 Jun 2010 01:32:43 +0200 Subject: Rectify argument order in mtdev_fetch The argument order in mtdev_fetch() differs from all other usages involved the file descriptor. Fixed with this patch. Signed-off-by: Henrik Rydberg --- src/iobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/iobuf.c') diff --git a/src/iobuf.c b/src/iobuf.c index 83e531a..199e0d8 100644 --- a/src/iobuf.c +++ b/src/iobuf.c @@ -41,7 +41,7 @@ int mtdev_idle(struct mtdev *dev, int fd, int ms) poll(&fds, 1, ms) <= 0; } -int mtdev_fetch(struct mtdev *dev, struct input_event *ev, int fd) +int mtdev_fetch(struct mtdev *dev, int fd, struct input_event *ev) { struct mtdev_iobuf *buf = &dev->state->iobuf; int n = buf->head - buf->tail; @@ -69,7 +69,7 @@ int mtdev_pull(struct mtdev *dev, int fd, int max_events) struct input_event ev; int ret, count = 0; while (max_events-- && !evbuf_full(&state->inbuf)) { - ret = mtdev_fetch(dev, &ev, fd); + ret = mtdev_fetch(dev, fd, &ev); if (ret < 0) return ret; if (ret == 0) -- cgit v1.2.3