aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-13 19:37:39 +0000
committerMike Frysinger <vapier@gentoo.org>2010-01-13 19:37:39 +0000
commitad532f1d3fe8651c6865aefff7edc9e9a576014f (patch)
treebbf6ee725e918cc55423fe0ed92705308f5816aa
parentcheck fwrite return value and handle common issues (diff)
downloadportage-utils-ad532f1d3fe8651c6865aefff7edc9e9a576014f.tar.gz
portage-utils-ad532f1d3fe8651c6865aefff7edc9e9a576014f.tar.bz2
portage-utils-ad532f1d3fe8651c6865aefff7edc9e9a576014f.zip
fix safe_fwrite continuation checkv0.3
-rw-r--r--libq/safe_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libq/safe_io.c b/libq/safe_io.c
index ef31911..f2e9805 100644
--- a/libq/safe_io.c
+++ b/libq/safe_io.c
@@ -3,7 +3,7 @@
*
* Copyright 2005-2010 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/libq/safe_io.c,v 1.1 2010/01/13 19:29:40 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/libq/safe_io.c,v 1.2 2010/01/13 19:37:39 vapier Exp $
*/
#include <stdio.h>
@@ -26,7 +26,7 @@ size_t safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
nmemb -= this_ret;
ret += this_ret;
ptr += (this_ret * size);
- } while (ret != nmemb);
+ } while (nmemb);
return ret;
}