[geocode-glib] lib: Handle 0 answer count as unlimited results
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] lib: Handle 0 answer count as unlimited results
- Date: Mon, 26 Nov 2012 13:44:55 +0000 (UTC)
commit a939c708e256f4689b3f6da56224865321837218
Author: Bastien Nocera <hadess hadess net>
Date: Mon Nov 26 14:30:55 2012 +0100
lib: Handle 0 answer count as unlimited results
geocode-glib/geocode-forward.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/geocode-glib/geocode-forward.c b/geocode-glib/geocode-forward.c
index b606cec..2ed0678 100644
--- a/geocode-glib/geocode-forward.c
+++ b/geocode-glib/geocode-forward.c
@@ -85,7 +85,7 @@ static void
set_is_search (GeocodeForward *forward,
GObject *object)
{
- if (forward->priv->answer_count > 1)
+ if (forward->priv->answer_count != 1)
g_object_set_data (object, "is-search", GINT_TO_POINTER (1));
}
@@ -432,7 +432,7 @@ geocode_forward_search_async (GeocodeForward *forward,
user_data,
geocode_forward_search_async);
- if (forward->priv->answer_count > 1)
+ if (forward->priv->answer_count != 1)
query = get_search_query_for_params (forward, &error);
else
query = _get_resolve_query_for_params (forward->priv->ht, FALSE);
@@ -678,7 +678,7 @@ geocode_forward_search (GeocodeForward *forward,
g_return_val_if_fail (GEOCODE_IS_FORWARD (forward), NULL);
- if (forward->priv->answer_count > 1)
+ if (forward->priv->answer_count != 1)
query = get_search_query_for_params (forward, error);
else
query = _get_resolve_query_for_params (forward->priv->ht, FALSE);
@@ -702,7 +702,7 @@ geocode_forward_search (GeocodeForward *forward,
to_cache = TRUE;
}
- if (forward->priv->answer_count > 1)
+ if (forward->priv->answer_count != 1)
ret = _geocode_parse_search_json (contents, error);
else
ret = _geocode_parse_single_result_json (contents, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]