userlibandfileserver/fileserver/sfile/sf_cache.cpp
branchRCL_3
changeset 23 1df514389a47
parent 0 a41df078684a
child 43 c1f20ce4abcf
equal deleted inserted replaced
22:2f92ad2dc5db 23:1df514389a47
   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);