summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-08-16 12:12:51 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-08-16 12:12:51 +0200
commit6802b90c0871726f0018b2c3c059bf8c95a4a710 (patch)
tree1fa6162a9a884565b970567bada109a67de42a80 /methods
parentea6db08d45e012d577f3081fa2070db9e034add9 (diff)
* methods/bzip2.cc:
- fix error checking for read in case of failing bzip2/lzma/whatever Spotted by -Wextra: bzip2.cc: In member function ‘virtual bool Bzip2Method::Fetch(pkgAcqMethod::FetchItem*)’: bzip2.cc:108:19: warning: comparison of unsigned expression < 0 is always false bzip2.cc:111:19: warning: comparison of unsigned expression < 0 is always false
Diffstat (limited to 'methods')
-rw-r--r--methods/bzip2.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/methods/bzip2.cc b/methods/bzip2.cc
index 19e49828e..241f21c66 100644
--- a/methods/bzip2.cc
+++ b/methods/bzip2.cc
@@ -102,9 +102,8 @@ bool Bzip2Method::Fetch(FetchItem *Itm)
while (1)
{
unsigned char Buffer[4*1024];
- unsigned long Count;
- Count = read(GzOut[0],Buffer,sizeof(Buffer));
+ ssize_t Count = read(GzOut[0],Buffer,sizeof(Buffer));
if (Count < 0 && errno == EINTR)
continue;