Bug 792581 - part 1: Replace LL_IS_ZERO macro with standard relation. r=ehsan

This commit is contained in:
Andrew Quartey 2012-10-03 10:13:18 -04:00
Родитель 2b93b54e8e
Коммит 816b3752e7
7 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -6881,7 +6881,7 @@ nsDocument::RetrieveRelevantHeaders(nsIChannel *aChannel)
}
}
if (LL_IS_ZERO(modDate)) {
if (modDate == 0) {
// We got nothing from our attempt to ask nsIFileChannel and
// nsIHttpChannel for the last modified time. Return the current
// time.

Просмотреть файл

@ -694,7 +694,7 @@ nsXULTemplateQueryProcessorRDF::CompareResults(nsIXULTemplateResult* aLeft,
int64_t delta;
LL_SUB(delta, ldate, rdate);
if (LL_IS_ZERO(delta))
if (delta == 0)
*aResult = 0;
else if (LL_GE_ZERO(delta))
*aResult = 1;

Просмотреть файл

@ -284,7 +284,7 @@ nsSHistory::CalcMaxTotalViewers()
// 4096 Mb 8
uint64_t bytes = PR_GetPhysicalMemorySize();
if (LL_IS_ZERO(bytes))
if (bytes == 0)
return 0;
// Conversion from unsigned int64 to double doesn't work on all platforms.

Просмотреть файл

@ -3692,7 +3692,7 @@ nsPluginHost::CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile)
rv = inFile->GetNativePath(filename);
if (NS_FAILED(rv)) return rv;
if (!LL_IS_ZERO(fileSize)) {
if (fileSize != 0) {
nsCOMPtr<nsIInputStream> inStream;
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStream), inFile);
if (NS_FAILED(rv)) return rv;

Просмотреть файл

@ -623,7 +623,7 @@ gfxUserFontSet::IncrementGeneration()
{
// add one, increment again if zero
LL_ADD(sFontSetGeneration, sFontSetGeneration, 1);
if (LL_IS_ZERO(sFontSetGeneration))
if (sFontSetGeneration == 0)
LL_ADD(sFontSetGeneration, sFontSetGeneration, 1);
mGeneration = sFontSetGeneration;
}

Просмотреть файл

@ -418,7 +418,7 @@ nsCRLManager::ComputeNextAutoUpdateTime(nsICRLInfo *info,
LL_SUB(diff, now, lastUpdate); //diff is the no of micro sec between now and last update
LL_DIV(cycleCnt, diff, microsecInDayCnt); //temp is the number of full cycles from lst update
LL_MOD(temp, diff, microsecInDayCnt);
if(!(LL_IS_ZERO(temp))) {
if(temp != 0) {
LL_ADD(cycleCnt,cycleCnt,1); //no of complete cycles till next autoupdate instant
}
LL_MUL(temp,cycleCnt,microsecInDayCnt); //micro secs from last update

Просмотреть файл

@ -278,7 +278,7 @@ static int cvt_ll(SprintfState *ss, int64_t num, int width, int prec,
int64_t rad;
/* according to the man page this needs to happen */
if ((prec == 0) && (LL_IS_ZERO(num))) {
if (prec == 0 && num == 0) {
return 0;
}
@ -290,7 +290,7 @@ static int cvt_ll(SprintfState *ss, int64_t num, int width, int prec,
LL_I2L(rad, radix);
cvt = &cvtbuf[0] + ELEMENTS_OF(cvtbuf);
digits = 0;
while (!LL_IS_ZERO(num)) {
while (num != 0) {
int32_t digit;
int64_t quot, rem;
LL_UDIVMOD(&quot, &rem, num, rad);