]> granicus.if.org Git - file/commitdiff
make memory read return the proper length.
authorChristos Zoulas <christos@zoulas.com>
Mon, 23 Feb 2009 20:51:55 +0000 (20:51 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 23 Feb 2009 20:51:55 +0000 (20:51 +0000)
src/cdf.c

index 27372cb98b357446da06ef645f326bccb7036572..6f35b33be44a07f08a5ca45aa6536238afdb9351 100644 (file)
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.17 2009/02/03 20:27:51 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.18 2009/02/23 20:44:47 christos Exp $")
 #endif
 
 #include <assert.h>
@@ -239,7 +239,7 @@ cdf_read(const cdf_info_t *info, off_t off, void *buf, size_t len)
 
        if (info->i_buf != NULL && info->i_len >= siz) {
                (void)memcpy(buf, &info->i_buf[off], len);
-               return 0;
+               return (ssize_t)len;
        }
 
        if (info->i_fd == -1)