Bug 229897. Fix build warning on brad. r+sr=roc, patch by Serge Gautherie

This commit is contained in:
roc+%cs.cmu.edu 2004-02-20 04:38:34 +00:00
Родитель 8da35ebc54
Коммит 43557c3a3d
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -112,7 +112,7 @@ nsresult nsRegionImpl::GetRects (nsRegionRectSet **aRects)
nsRegionRectSet* pRegionSet = *aRects;
PRUint32 NumRects = mRegion.GetNumRects ();
if (pRegionSet == nsnull) // Not yet allocated
if (!pRegionSet) // Not yet allocated
{
PRUint8* pBuf = new PRUint8 [sizeof (nsRegionRectSet) + NumRects * sizeof (nsRegionRect)];
pRegionSet = NS_REINTERPRET_CAST (nsRegionRectSet*, pBuf);
@ -135,14 +135,14 @@ nsresult nsRegionImpl::GetRects (nsRegionRectSet **aRects)
nsRegionRect* pDest = &pRegionSet->mRects [0];
const nsRect* pSrc;
while (pSrc = ri.Next ())
while ((pSrc = ri.Next ()) != nsnull)
{
pDest->x = pSrc->x;
pDest->y = pSrc->y;
pDest->width = pSrc->width;
pDest->height = pSrc->height;
pDest++;
++pDest;
}
return NS_OK;