From: Christos Zoulas Date: Mon, 23 Feb 2009 20:51:55 +0000 (+0000) Subject: make memory read return the proper length. X-Git-Tag: FILE5_01~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=862dd3b1f74c03010fd2358da2cfe7a5fb46a7ea;p=file make memory read return the proper length. --- diff --git a/src/cdf.c b/src/cdf.c index 27372cb9..6f35b33b 100644 --- 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 @@ -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)