Bug 708277 - Replace PR_MAX with NS_MAX. r=roc

This commit is contained in:
Thomas Prip Vestergaard 2011-12-22 11:47:59 +01:00
parent 8232f6adc6
commit 9e1bfdef23
3 changed files with 4 additions and 4 deletions

View File

@ -2115,7 +2115,7 @@ nsresult nsBuiltinDecoderStateMachine::ScheduleStateMachine(PRInt64 aUsecs) {
if (mState == DECODER_STATE_SHUTDOWN) {
return NS_ERROR_FAILURE;
}
aUsecs = PR_MAX(aUsecs, 0);
aUsecs = NS_MAX(aUsecs, 0);
TimeStamp timeout = TimeStamp::Now() + UsecsToDuration(aUsecs);
if (!mTimeout.IsNull()) {

View File

@ -410,7 +410,7 @@ nsMemoryCacheDevice::EvictEntriesIfNecessary(void)
if (entry != &mEvictionList[i]) {
entryCost = (PRUint64)
(now - entry->LastFetched()) * entry->Size() /
PR_MAX(1, entry->FetchCount());
NS_MAX(1, entry->FetchCount());
if (!maxEntry || (entryCost > maxCost)) {
maxEntry = entry;
maxCost = entryCost;

View File

@ -310,7 +310,7 @@ PL_DHashTableSetAlphaBounds(PLDHashTable *table,
"PL_DHASH_MIN_SIZE - (maxAlpha * PL_DHASH_MIN_SIZE) >= 1");
if (PL_DHASH_MIN_SIZE - (maxAlpha * PL_DHASH_MIN_SIZE) < 1) {
maxAlpha = (float)
(PL_DHASH_MIN_SIZE - PR_MAX(PL_DHASH_MIN_SIZE / 256, 1))
(PL_DHASH_MIN_SIZE - NS_MAX(PL_DHASH_MIN_SIZE / 256, 1))
/ PL_DHASH_MIN_SIZE;
}
@ -323,7 +323,7 @@ PL_DHashTableSetAlphaBounds(PLDHashTable *table,
"minAlpha < maxAlpha / 2");
if (minAlpha >= maxAlpha / 2) {
size = PL_DHASH_TABLE_SIZE(table);
minAlpha = (size * maxAlpha - PR_MAX(size / 256, 1)) / (2 * size);
minAlpha = (size * maxAlpha - NS_MAX(size / 256, 1)) / (2 * size);
}
table->maxAlphaFrac = (PRUint8)(maxAlpha * 256);