userlibandfileserver/fileserver/sfile/sf_cache.cpp
changeset 102 ef2a444a7410
parent 0 a41df078684a
equal deleted inserted replaced
90:947f0dc9f7a8 102:ef2a444a7410
   608 		} while (r==KErrNone);
   608 		} while (r==KErrNone);
   609 	d.Close();
   609 	d.Close();
   610 	if(r==KErrNoMemory)
   610 	if(r==KErrNoMemory)
   611 		return r;
   611 		return r;
   612 
   612 
       
   613 	iCache = (TFileCacheRecord**)User::ReAlloc(pIndexes,sizeof(TFileCacheRecord*)*currentIndex);
       
   614 	if(!iCache)
       
   615 	    return KErrNoMemory;
       
   616 	
   613 	iNotPresent = EFalse;
   617 	iNotPresent = EFalse;
   614 	iCache = (TFileCacheRecord**)User::ReAlloc(pIndexes,sizeof(TFileCacheRecord*)*currentIndex);
       
   615 	iRecordCount = currentIndex;
   618 	iRecordCount = currentIndex;
   616 	if (currentIndex>1)
   619 	if (currentIndex>1)
   617 		{
   620 		{
   618 		// don't sort an empty list, or a list with only 1 element
   621 		// don't sort an empty list, or a list with only 1 element
   619 		RPointerArray<TFileCacheRecord> rarray(iCache, iRecordCount);
   622 		RPointerArray<TFileCacheRecord> rarray(iCache, iRecordCount);