diff --git a/HJCacheClasses/HJMOFileCache.m b/HJCacheClasses/HJMOFileCache.m index 7ba7b23..b811ea2 100755 --- a/HJCacheClasses/HJMOFileCache.m +++ b/HJCacheClasses/HJMOFileCache.m @@ -204,7 +204,7 @@ -(void)trimCacheDir:(NSString*)cachePath { int deletedCount=0; long deletedBytes=0; // this loop is the slow part, which is why this whole method is run on a separate thread. - while (file = [dirEnum nextObject]) { + while ((file = [dirEnum nextObject])) { NSString* filename = [NSString stringWithFormat:@"%@%@",cachePath,file]; NSError* e; NSDictionary* fsAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filename error:&e]; diff --git a/HJCacheClasses/HJManagedImageV.m b/HJCacheClasses/HJManagedImageV.m index 8c224fa..c76c6f3 100755 --- a/HJCacheClasses/HJManagedImageV.m +++ b/HJCacheClasses/HJManagedImageV.m @@ -26,7 +26,8 @@ @implementation HJManagedImageV - (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { + self = [super initWithFrame:frame]; + if (self) { isCancelled=NO; modification=0; url=nil;