]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aac_afh.c
aac_afh: Be more lenient about zero sized reads.
[paraslash.git] / aac_afh.c
index 2b3dd2cc538a57a233813b77adcb332bd77929ce..026df50f00c43bff16294d3ec26a869517f7e3c1 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -37,12 +37,8 @@ static uint32_t aac_afh_read_cb(void *user_data, void *dest, uint32_t want)
        struct aac_afh_context *c = user_data;
        uint32_t have, rv;
 
-       if (want == 0 || c->fpos >= c->mapsize) {
-               PARA_INFO_LOG("failed attempt to read %u bytes @%zu\n", want,
-                       c->fpos);
-               errno = EAGAIN;
-               return -1;
-       }
+       if (want == 0 || c->fpos >= c->mapsize)
+               return 0;
        have = c->mapsize - c->fpos;
        rv = PARA_MIN(have, want);
        PARA_DEBUG_LOG("reading %u bytes @%zu\n", rv, c->fpos);