summaryrefslogtreecommitdiff
path: root/tests/jittertest/JitterTest.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-11-02 01:10:11 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-11-03 19:41:32 +0100
commit0555cb2ea9bdc8e210e87e009154954a9bbc3a55 (patch)
treeb873918aca10f27e4f7b722b265dd1085867bd2d /tests/jittertest/JitterTest.c
parent475bf707b958f37844534b7b45c905521c7401a2 (diff)
jittertest: Use the appropriate versions of abs()
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>
Diffstat (limited to 'tests/jittertest/JitterTest.c')
-rw-r--r--tests/jittertest/JitterTest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/jittertest/JitterTest.c b/tests/jittertest/JitterTest.c
index 4627fb0..e109995 100644
--- a/tests/jittertest/JitterTest.c
+++ b/tests/jittertest/JitterTest.c
@@ -591,12 +591,12 @@ void AlarmHandler(
/* 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);