From fe66bdf65e57fa7dee3dcb8dea068fb3fc7aec34 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 9 Aug 2018 11:59:40 +0200 Subject: [PATCH] libmm-glib,signal: fix MM_SIGNAL_UNKNOWN symbol value Unfortunately, G_MINDOUBLE is basically 0.0, so MM_SIGNAL_UNKNOWN ends up giving us a value that may fall in the range of expected values for the signal component. Update the MM_SIGNAL_UNKNOWN symbol to match a value which is definitely out any other possible valid range, so that we can easily detect which values are set and which aren't. While API is maintained, this fix is introducing an ABI break. Not a big deal anyway, as the purpose of the value is just to detect unset fields. --- libmm-glib/mm-signal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmm-glib/mm-signal.h b/libmm-glib/mm-signal.h index f7e8e61f..c94d9b2b 100644 --- a/libmm-glib/mm-signal.h +++ b/libmm-glib/mm-signal.h @@ -30,7 +30,7 @@ G_BEGIN_DECLS * * Identifier for an unknown signal value. */ -#define MM_SIGNAL_UNKNOWN G_MINDOUBLE +#define MM_SIGNAL_UNKNOWN -G_MAXDOUBLE #define MM_TYPE_SIGNAL (mm_signal_get_type ()) #define MM_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIGNAL, MMSignal))