diff -r bd7edf625bdd -r 97232defd20e pimappservices/calendar/server/src/agsattachmentindex.cpp --- a/pimappservices/calendar/server/src/agsattachmentindex.cpp Wed Sep 01 12:32:31 2010 +0100 +++ b/pimappservices/calendar/server/src/agsattachmentindex.cpp Tue Sep 14 21:17:03 2010 +0300 @@ -281,8 +281,7 @@ { // check every attachment const CAgnAttachmentIndexItem* KAttachmentItem = iIndex[i]; - const TInt entryCount = KAttachmentItem->Entries().Count(); - for (TInt j = 0; j < entryCount; ++j) + for (TInt j = 0; j < KAttachmentItem->Entries().Count(); ++j) { // check every entry associated with each attachment if (KEntryLocalUid == (KAttachmentItem->Entries())[j])