]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Use llabs instead of abs on 64bit integers.
authorUllrich Kossow <ullrich.kossow@web.de>
Sat, 11 Apr 2015 18:04:58 +0000 (20:04 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 15 Apr 2015 16:16:27 +0000 (18:16 +0200)
src/plumbing/tsfix.c

index 1258160bb0f7b33ef4fc2642bc64c10f51660376..9d5604addb47b5fd61175ece907e3310bdc9dc91 100644 (file)
@@ -82,14 +82,14 @@ tsfix_ts_diff(int64_t ts1, int64_t ts2)
   ts1 &= PTS_MASK;
   ts2 &= PTS_MASK;
 
-  r = abs(ts1 - ts2);
+  r = llabs(ts1 - ts2);
   if (r > (PTS_MASK / 2)) {
     /* try to wrap the lowest value */
     if (ts1 < ts2)
       ts1 += PTS_MASK + 1;
     else
       ts2 += PTS_MASK + 1;
-    return abs(ts1 - ts2);
+    return llabs(ts1 - ts2);
   }
   return r;
 }