When passing a long argument, actually use labs().
The other case of passing a float to "int abs(int)" and
casting the result to an int doesn't really make sense.
Pull the cast inside the abs().
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
/* Store some historical #'s */
- if(abs(timeDiffusec) > LastMaxDiff)
+ if(labs(timeDiffusec) > LastMaxDiff)
{
- LastMaxDiff = abs(timeDiffusec);
+ LastMaxDiff = labs(timeDiffusec);
sprintf(&tmpBuf[strlen(tmpBuf)],"!");
- if((GrabKProfile == TRUE) && (ProfileTriggerMSecs < (abs(timeDiffusec)/1000)))
+ if((GrabKProfile == TRUE) && (ProfileTriggerMSecs < (labs(timeDiffusec)/1000)))
{
sprintf(profileFileName, "JitterTest.profilesnap-%i", profileFileNo);
}
/* Is the jitter value > threshold value? */
- if(abs(jitter_ms) > JitterThreshold_ms)
+ if(abs((int)jitter_ms) > JitterThreshold_ms)
{
/* Found a jitter line that matches our crietrion.
Now set flag to be on the look out for the next
if(saveJitterCnt < MAX_SAVE_BUFFER)
{
- saveJitter[saveJitterCnt] = (int)abs(jitter_ms); /* why keep the (ms) jitter in float */
+ saveJitter[saveJitterCnt] = abs((int)jitter_ms); /* why keep the (ms) jitter in float */
dataLineNo[saveJitterCnt] = lineNo;
saveJitterCnt++;
lookFor_df = TRUE;