if(ST_SUBSTRING_MATCH_MAX != looper)
if(ST_SUBSTRING_MATCH_MAX == looper) { matched = PR_TRUE; } if(PR_FALSE == matched)
int harvestRun(const STRun* aInRun, STRun* aOutRun, STOptions* aOptions){    int retval = 0;    if(NULL != aInRun && NULL != aOutRun && aInRun != aOutRun)    {        PRUint32 traverse = 0;        STAllocation* current = NULL;        /*        ** Fixup options if not provided.        */        if(NULL == aOptions)        {            aOptions = &globals.mOptions;        }        for(traverse = 0; 0 == retval && traverse < aInRun->mAllocationCount; traverse++)        {            current = aInRun->mAllocations[traverse];            if(NULL != current)            {                PRUint32 lifetime = 0;                PRUint32 bytesize = 0;                PRUint64 weight64 = LL_INIT(0, 0);                PRUint64 bytesize64 = LL_INIT(0, 0);                PRUint64 lifetime64 = LL_INIT(0, 0);                int appendRes = 0;                int looper = 0;                /*                ** Use this as an opportune time to fixup a memory                **  leaked timeval, so as to not completely skew                **  the weights.                */                if(ST_TIMEVAL_MAX == current->mMaxTimeval)                {                    current->mMaxTimeval = globals.mMaxTimeval;                }                /*                ** Check allocation timeval restrictions.                ** We have to slide the recorded timevals to be zero                **  based, so that the comparisons make sense.                */                if(aOptions->mAllocationTimevalMin > (current->mMinTimeval - globals.mMinTimeval))                {                    continue;                }                else if(aOptions->mAllocationTimevalMax < (current->mMinTimeval - globals.mMinTimeval))                {                    continue;                }                /*                ** Check timeval restrictions.                ** We have to slide the recorded timevals to be zero                **  based, so that the comparisons make sense.                */                if(aOptions->mTimevalMin > (current->mMaxTimeval - globals.mMinTimeval))                {                    continue;                }                else if(aOptions->mTimevalMax < (current->mMinTimeval - globals.mMinTimeval))                {                    continue;                }                /*                ** Check lifetime restrictions.                */                lifetime = current->mMaxTimeval - current->mMinTimeval;                if(lifetime < aOptions->mLifetimeMin)                {                    continue;                }                else if(lifetime > aOptions->mLifetimeMax)                {                    continue;                }                /*                ** Check byte size restrictions.                */                bytesize = byteSize(current);                if(bytesize < aOptions->mSizeMin)                {                    continue;                }                else if(bytesize > aOptions->mSizeMax)                {                    continue;                }                /*                ** Check weight restrictions.                */                LL_UI2L(bytesize64, bytesize);                LL_UI2L(lifetime64, lifetime);                LL_MUL(weight64, bytesize64, lifetime64);                if(LL_UCMP(weight64, <, aOptions->mWeightMin64))                {                    continue;                }                else if(LL_UCMP(weight64, >, aOptions->mWeightMax64))                {                    continue;                }                /*                ** Possibly restrict the callsite by text.                ** Do this last, as it is a heavier check.                **                ** One day, we may need to expand the logic to check for                **  events beyond the initial allocation event.                */                for(looper = 0; ST_SUBSTRING_MATCH_MAX > looper; looper++)                {                    if(NULL != globals.mOptions.mRestrictText[looper] && '\0' != globals.mOptions.mRestrictText[looper][0])                    {                        if(0 == hasCallsiteMatch(current->mEvents[0].mCallsite, globals.mOptions.mRestrictText[looper], ST_FOLLOW_PARENTS))                        {                            break;                        }                    }                }                if(ST_SUBSTRING_MATCH_MAX != looper)                {                    continue;                }                /*                ** You get here, we add to the run.                */                appendRes = appendAllocation(aOutRun, current);                if(0 == appendRes)                {                    retval = __LINE__;                    REPORT_ERROR(__LINE__, appendAllocation);                }            }        }    }    return retval;}