From 3c322b10221a18d83b55fbfdfe5d4e59e27772f7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 10 May 2014 10:34:11 +0200 Subject: common: change MP_NOPTS_VALUE definition Use the exact floating point value, instead of a broken integer constant. The expression calculating the constant probably relied on undefined behavior, because it left-shifts a negative value. This also changes the type of the constant to double, which is perfectly fine, and maybe better than an integer constant. --- common/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/common.h') diff --git a/common/common.h b/common/common.h index 564d1f3ea0..6c759e9258 100644 --- a/common/common.h +++ b/common/common.h @@ -27,8 +27,8 @@ #include "compat/compiler.h" #include "talloc.h" -// both int64_t and double should be able to represent this exactly -#define MP_NOPTS_VALUE (-1LL<<63) +// double should be able to represent this exactly +#define MP_NOPTS_VALUE (-0x1p+63) #define MP_CONCAT_(a, b) a ## b #define MP_CONCAT(a, b) MP_CONCAT_(a, b) -- cgit v1.2.3