diff options
author | Teemu Ikonen <tpikonen@mailbox.org> | 2021-11-03 22:33:00 +0200 |
---|---|---|
committer | Teemu Ikonen <tpikonen@mailbox.org> | 2021-11-07 16:45:01 +0200 |
commit | 693cd007aec57706e4e16225f99c6e1d5d3d996c (patch) | |
tree | 78ed674719c1eb1b6b0d9a7d1d51137b9db77db5 | |
parent | 4542856d84a313217a1c3f0024599d267fe1ef04 (diff) |
Fix return values in GClueLocationSource start() implementations
Return the correct enum also in g_return_val_if_fail calls.
These were missed in in commit 2d1968f84fa81 (merge request !94).
-rw-r--r-- | src/gclue-3g.c | 3 | ||||
-rw-r--r-- | src/gclue-cdma.c | 3 | ||||
-rw-r--r-- | src/gclue-locator.c | 3 | ||||
-rw-r--r-- | src/gclue-modem-gps.c | 3 | ||||
-rw-r--r-- | src/gclue-nmea-source.c | 3 | ||||
-rw-r--r-- | src/gclue-wifi.c | 3 |
6 files changed, 12 insertions, 6 deletions
diff --git a/src/gclue-3g.c b/src/gclue-3g.c index e49c622..998942e 100644 --- a/src/gclue-3g.c +++ b/src/gclue-3g.c @@ -278,7 +278,8 @@ gclue_3g_start (GClueLocationSource *source) GClue3GPrivate *priv; GClueLocationSourceStartResult base_result; - g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), FALSE); + g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), + GCLUE_LOCATION_SOURCE_START_RESULT_FAILED); priv = GCLUE_3G (source)->priv; base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_3g_parent_class); diff --git a/src/gclue-cdma.c b/src/gclue-cdma.c index 82c24e6..a35c07a 100644 --- a/src/gclue-cdma.c +++ b/src/gclue-cdma.c @@ -213,7 +213,8 @@ gclue_cdma_start (GClueLocationSource *source) GClueCDMAPrivate *priv; GClueLocationSourceStartResult base_result; - g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), FALSE); + g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), + GCLUE_LOCATION_SOURCE_START_RESULT_FAILED); priv = GCLUE_CDMA (source)->priv; base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_cdma_parent_class); diff --git a/src/gclue-locator.c b/src/gclue-locator.c index 3680c47..05efeb0 100644 --- a/src/gclue-locator.c +++ b/src/gclue-locator.c @@ -461,7 +461,8 @@ gclue_locator_start (GClueLocationSource *source) GList *node; GClueLocationSourceStartResult base_result; - g_return_val_if_fail (GCLUE_IS_LOCATOR (source), FALSE); + g_return_val_if_fail (GCLUE_IS_LOCATOR (source), + GCLUE_LOCATION_SOURCE_START_RESULT_FAILED); locator = GCLUE_LOCATOR (source); base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_locator_parent_class); diff --git a/src/gclue-modem-gps.c b/src/gclue-modem-gps.c index 9e073af..4dfa9b7 100644 --- a/src/gclue-modem-gps.c +++ b/src/gclue-modem-gps.c @@ -240,7 +240,8 @@ gclue_modem_gps_start (GClueLocationSource *source) GClueModemGPSPrivate *priv; GClueLocationSourceStartResult base_result; - g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), FALSE); + g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), + GCLUE_LOCATION_SOURCE_START_RESULT_FAILED); priv = GCLUE_MODEM_GPS (source)->priv; base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_modem_gps_parent_class); diff --git a/src/gclue-nmea-source.c b/src/gclue-nmea-source.c index 1a36030..f7ac644 100644 --- a/src/gclue-nmea-source.c +++ b/src/gclue-nmea-source.c @@ -728,7 +728,8 @@ gclue_nmea_source_start (GClueLocationSource *source) GClueLocationSourceClass *base_class; GClueLocationSourceStartResult base_result; - g_return_val_if_fail (GCLUE_IS_NMEA_SOURCE (source), FALSE); + g_return_val_if_fail (GCLUE_IS_NMEA_SOURCE (source), + GCLUE_LOCATION_SOURCE_START_RESULT_FAILED); base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_nmea_source_parent_class); base_result = base_class->start (source); diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c index 09a8379..8a319e1 100644 --- a/src/gclue-wifi.c +++ b/src/gclue-wifi.c @@ -736,7 +736,8 @@ gclue_wifi_start (GClueLocationSource *source) GClueLocationSourceClass *base_class; GClueLocationSourceStartResult base_result; - g_return_val_if_fail (GCLUE_IS_WIFI (source), FALSE); + g_return_val_if_fail (GCLUE_IS_WIFI (source), + GCLUE_LOCATION_SOURCE_START_RESULT_FAILED); base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_wifi_parent_class); base_result = base_class->start (source); |