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.
This commit is contained in:
wm4
2014-05-10 10:34:11 +02:00
parent fc385baf02
commit 3c322b1022

View File

@@ -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)