[PATCH 14/18] user-cr: nleft should always be 0 on success

Matt Helsley matthltc at us.ibm.com
Thu Mar 17 10:27:46 PDT 2011


nleft == len also signifies that we did not read the expected information.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
---
 ckptinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ckptinfo.c b/ckptinfo.c
index eafc2a7..78fc279 100644
--- a/ckptinfo.c
+++ b/ckptinfo.c
@@ -176,7 +176,7 @@ static int __image_read(int fd, void *buf, int len)
 		return -1;
 	}
 
-	if (nleft && nleft != len) {
+	if (nleft) {
 		fprintf(stderr, "unexpected end of file (read %d of %d)\n",
 			len - nleft, len);
 		return -1;
-- 
1.6.3.3



More information about the Containers mailing list