Bug 792581 - part 5: Replace LL_CMP macro with standard comparison. r=ehsan
This commit is contained in:
@@ -1275,7 +1275,7 @@ nsContentSink::IsTimeToNotify()
|
||||
LL_I2L(interval, GetNotificationInterval());
|
||||
LL_SUB(diff, now, mLastNotificationTime);
|
||||
|
||||
if (LL_CMP(diff, >, interval)) {
|
||||
if (diff > interval) {
|
||||
mBackoffCount--;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ nsSHistory::CalcMaxTotalViewers()
|
||||
// Conversion from unsigned int64 to double doesn't work on all platforms.
|
||||
// We need to truncate the value at INT64_MAX to make sure we don't
|
||||
// overflow.
|
||||
if (LL_CMP(bytes, >, INT64_MAX))
|
||||
if (bytes > INT64_MAX)
|
||||
bytes = INT64_MAX;
|
||||
|
||||
uint64_t kbytes;
|
||||
|
||||
@@ -1983,7 +1983,7 @@ struct CompareFilesByTime
|
||||
bool
|
||||
LessThan(const nsCOMPtr<nsIFile>& a, const nsCOMPtr<nsIFile>& b) const
|
||||
{
|
||||
return LL_CMP(GetPluginLastModifiedTime(a), <, GetPluginLastModifiedTime(b));
|
||||
return GetPluginLastModifiedTime(a) < GetPluginLastModifiedTime(b);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -744,7 +744,7 @@ mozJSComponentLoader::GlobalForLocation(nsIFile *aComponentFile,
|
||||
|
||||
int64_t maxSize;
|
||||
LL_UI2L(maxSize, UINT32_MAX);
|
||||
if (LL_CMP(fileSize, >, maxSize)) {
|
||||
if (fileSize > maxSize) {
|
||||
NS_ERROR("file too large");
|
||||
JS_SetOptions(cx, oldopts);
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
2
netwerk/cache/nsCacheService.cpp
vendored
2
netwerk/cache/nsCacheService.cpp
vendored
@@ -942,7 +942,7 @@ nsCacheProfilePrefObserver::MemoryCacheCapacity()
|
||||
// Conversion from unsigned int64 to double doesn't work on all platforms.
|
||||
// We need to truncate the value at INT64_MAX to make sure we don't
|
||||
// overflow.
|
||||
if (LL_CMP(bytes, >, INT64_MAX))
|
||||
if (bytes > INT64_MAX)
|
||||
bytes = INT64_MAX;
|
||||
|
||||
uint64_t kbytes;
|
||||
|
||||
@@ -535,7 +535,7 @@ nsHttpResponseHead::GetExpiresValue(uint32_t *result) const
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (LL_CMP(time, <, LL_Zero()))
|
||||
if (time < LL_Zero())
|
||||
*result = 0;
|
||||
else
|
||||
*result = PRTimeToSeconds(time);
|
||||
|
||||
@@ -930,7 +930,7 @@ GetDateBoundary(nsIX509Cert* ix509,
|
||||
return;
|
||||
|
||||
PRTime now = PR_Now();
|
||||
if (LL_CMP(now, >, notAfter)) {
|
||||
if (now > notAfter) {
|
||||
timeToUse = notAfter;
|
||||
} else {
|
||||
timeToUse = notBefore;
|
||||
|
||||
@@ -231,7 +231,7 @@ done:
|
||||
//with the next update date. We will not reschedule this crl in this
|
||||
//session anymore - or else, we land into a loop. It would anyway be
|
||||
//imported once the browser is restarted.
|
||||
if(LL_CMP(updateTime, > , PR_Now())){
|
||||
if(int64_t(updateTime) > int64_t(PR_Now())){
|
||||
toBeRescheduled = true;
|
||||
}
|
||||
nsMemory::Free(updateTime);
|
||||
@@ -433,8 +433,8 @@ nsCRLManager::ComputeNextAutoUpdateTime(nsICRLInfo *info,
|
||||
|
||||
//Now, a basic constraing is that the next auto update date can never be after
|
||||
//next update, if one is defined
|
||||
if(LL_CMP(nextUpdate , > , 0 )) {
|
||||
if(LL_CMP(tempTime , > , nextUpdate)) {
|
||||
if(nextUpdate > 0) {
|
||||
if(tempTime > nextUpdate) {
|
||||
tempTime = nextUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -937,7 +937,7 @@ SortSizeCallback(const void* aElement1, const void* aElement2, void* aContext)
|
||||
if (size1 == size2)
|
||||
return 0;
|
||||
|
||||
return (LL_CMP(size1, <, size2) ? -1 : 1);
|
||||
return size1 < size2 ? -1 : 1;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -953,7 +953,7 @@ SortDateCallback(const void* aElement1, const void* aElement2, void* aContext)
|
||||
if (time1 == time2)
|
||||
return 0;
|
||||
|
||||
return (LL_CMP(time1, <, time2) ? -1 : 1);
|
||||
return time1 < time2 ? -1 : 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
// Emulate string comparison (used for sorting) for PRTime and int.
|
||||
inline int32_t ComparePRTime(PRTime a, PRTime b)
|
||||
{
|
||||
if (LL_CMP(a, <, b))
|
||||
if (a < b)
|
||||
return -1;
|
||||
else if (LL_CMP(a, >, b))
|
||||
else if (a > b)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ DataStruct::ReadCache(nsISupports** aData, uint32_t* aDataLen)
|
||||
int64_t fileSize;
|
||||
int64_t max32(LL_INIT(0, 0xFFFFFFFF));
|
||||
cacheFile->GetFileSize(&fileSize);
|
||||
if (LL_CMP(fileSize, >, max32))
|
||||
if (fileSize > max32)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
uint32_t size;
|
||||
LL_L2UI(size, fileSize);
|
||||
|
||||
Reference in New Issue
Block a user