ObjFW  Diff

Differences From Artifact [294ed882f2]:

To Artifact [8ca1f870f4]:


874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889

	_lastCacheCleanup = now;
	removeList = [OFMutableArray arrayWithCapacity: _cache.count];

	for (OFDNSQuery *query in _cache) {
		OFPair OF_GENERIC(OFDate *, OFDNSResponse *) *entry =
		    [_cache objectForKey: query];
		uint32_t age =
		    (uint32_t)now - [entry.firstObject timeIntervalSince1970];
		OFDNSResponse *response = entry.secondObject;

		if (containsExpiredRecord(response.answerRecords, age) ||
		    containsExpiredRecord(response.authorityRecords, age) ||
		    containsExpiredRecord(response.additionalRecords, age))
			[removeList addObject: query];
	}







|
|







874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889

	_lastCacheCleanup = now;
	removeList = [OFMutableArray arrayWithCapacity: _cache.count];

	for (OFDNSQuery *query in _cache) {
		OFPair OF_GENERIC(OFDate *, OFDNSResponse *) *entry =
		    [_cache objectForKey: query];
		uint32_t age = (uint32_t)now -
		    (uint32_t)[entry.firstObject timeIntervalSince1970];
		OFDNSResponse *response = entry.secondObject;

		if (containsExpiredRecord(response.answerRecords, age) ||
		    containsExpiredRecord(response.authorityRecords, age) ||
		    containsExpiredRecord(response.additionalRecords, age))
			[removeList addObject: query];
	}