From dafbb164060463db6c906f729c05975c246bae7f Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Wed, 4 Jan 2012 19:31:17 -0500 Subject: [PATCH] Tracker (FSUtils): negative passed to unsigned parameter BVolume::BlockSize() might return a negative value (error code) and it was passed as parameter of CalcItemsAndSize() as a size_t (unsigned). Thus the check for an error code failed. CID 4171. --- src/kits/tracker/FSUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp index 573380a954..150225bb33 100644 --- a/src/kits/tracker/FSUtils.cpp +++ b/src/kits/tracker/FSUtils.cpp @@ -115,7 +115,7 @@ static status_t MoveTask(BObjectList *, BEntry *, BList *, uint32); static status_t _DeleteTask(BObjectList *, bool); static status_t _RestoreTask(BObjectList *); status_t CalcItemsAndSize(CopyLoopControl* loopControl, - BObjectList *refList, size_t blockSize, int32 *totalCount, + BObjectList *refList, ssize_t blockSize, int32 *totalCount, off_t *totalSize); status_t MoveItem(BEntry *entry, BDirectory *destDir, BPoint *loc, uint32 moveMode, const char *newName, Undo &undo, @@ -2391,7 +2391,7 @@ FSRecursiveCalcSize(BInfoWindow* window, CopyLoopControl* loopControl, status_t CalcItemsAndSize(CopyLoopControl* loopControl, BObjectList *refList, - size_t blockSize, int32 *totalCount, off_t *totalSize) + ssize_t blockSize, int32 *totalCount, off_t *totalSize) { int32 fileCount = 0; int32 dirCount = 0;