Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-06-28 23:44:31 +1000
committerDan McGee <dan@archlinux.org>2010-06-30 08:32:11 -0500
commit081e6a83608a28516abb326c1f66a07b691e1a32 (patch)
treef00be7ec4b086fd6aa4d684b192040fd2644f513 /lib/libalpm
parent630e7508ee44f2c41ba3f5d17c0c9ac15b15af3b (diff)
Do not compare signed and unsigned types
The casting of nread is safe as it is tested to be >0 when it is initally assigned. It is also being implicitly cast in the fwrite call in the line above. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index c11148d1..3185d2aa 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -251,7 +251,7 @@ static int download_internal(const char *url, const char *localpath,
check_stop();
size_t nwritten = 0;
nwritten = fwrite(buffer, 1, nread, localf);
- if((nwritten != nread) || ferror(localf)) {
+ if((nwritten != (size_t)nread) || ferror(localf)) {
pm_errno = PM_ERR_RETRIEVE;
_alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"),
tempfile, strerror(errno));