[discident-glib] lib: Fix some badly initialised values
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [discident-glib] lib: Fix some badly initialised values
- Date: Tue, 2 Apr 2013 13:49:23 +0000 (UTC)
commit 2d98e4777d7256588c5fc08c8871bc54659b3cbe
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 2 15:26:56 2013 +0200
lib: Fix some badly initialised values
The return values weren't zeroed on init, or when checking for
the image URL.
discident-glib/discident-ean-glib.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/discident-glib/discident-ean-glib.c b/discident-glib/discident-ean-glib.c
index b2e61de..b08588f 100644
--- a/discident-glib/discident-ean-glib.c
+++ b/discident-glib/discident-ean-glib.c
@@ -263,7 +263,7 @@ parse_lookup_response (const char *response,
*ret_title = (char *) title;
img_url = xmlGetProp (doc->children, (const xmlChar *) "imageUrl");
- if (img_url != NULL)
+ if (ret_img_url != NULL)
*ret_img_url = (char *) img_url;
xmlFreeDoc (doc);
@@ -375,8 +375,8 @@ got_body_query (SoupMessage *msg,
QueryData *data)
{
char *response;
- char *title;
- char *img_url;
+ char *title = NULL;
+ char *img_url = NULL;
if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code) ||
msg->response_body == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]