summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-08-09 11:59:40 +0200
committerDan Williams <dcbw@redhat.com>2018-08-09 13:52:53 +0000
commitfe66bdf65e57fa7dee3dcb8dea068fb3fc7aec34 (patch)
treef9bd7b2197f8c331a41dcf9880c0b2054be63e58
parent2773475f438e3979bcd3c597467019209a685891 (diff)
downloadModemManager-fe66bdf65e57fa7dee3dcb8dea068fb3fc7aec34.tar.gz
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.
-rw-r--r--libmm-glib/mm-signal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmm-glib/mm-signal.h b/libmm-glib/mm-signal.h
index f7e8e61f8..c94d9b2bf 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))