[discident-glib] Put the query string into a define



commit 6de1bdb1e75e46fdef69f96e530af220bf68299a
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 18 19:58:02 2010 +0000

    Put the query string into a define

 discident-glib/discident-glib-private.h |    2 ++
 discident-glib/discident-glib.c         |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/discident-glib/discident-glib-private.h b/discident-glib/discident-glib-private.h
index 3da3fec..4d177ac 100644
--- a/discident-glib/discident-glib-private.h
+++ b/discident-glib/discident-glib-private.h
@@ -1,4 +1,6 @@
 
+#define QUERY_GTIN "http://discident.com/v1/%s/";
+
 char *generate_hash (const char *str, gssize len);
 char *discident_get_title_for_gtin (const char *gtin,
 				    GError    **error);
diff --git a/discident-glib/discident-glib.c b/discident-glib/discident-glib.c
index df93843..7e2a3e3 100644
--- a/discident-glib/discident-glib.c
+++ b/discident-glib/discident-glib.c
@@ -370,7 +370,7 @@ get_file_for_gtin (const char *gtin)
 	GFile *file;
 	char *str;
 
-	str = g_strdup_printf ("http://discident.com/v1/%s/";, gtin);
+	str = g_strdup_printf (QUERY_GTIN, gtin);
 	file = g_file_new_for_uri (str);
 	g_free (str);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]