diff options
Diffstat (limited to 'gdata/gd/gdata-gd-im-address.c')
-rw-r--r-- | gdata/gd/gdata-gd-im-address.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/gdata/gd/gdata-gd-im-address.c b/gdata/gd/gdata-gd-im-address.c index 7e202a17..a074cfc3 100644 --- a/gdata/gd/gdata-gd-im-address.c +++ b/gdata/gd/gdata-gd-im-address.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* * GData Client - * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk> + * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk> * * GData Client is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -238,7 +238,7 @@ gdata_gd_im_address_set_property (GObject *object, guint property_id, const GVal static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error) { - xmlChar *address, *protocol, *rel, *label, *primary; + xmlChar *address, *protocol, *rel, *primary; gboolean primary_bool; GDataGDIMAddressPrivate *priv = GDATA_GD_IM_ADDRESS (parsable)->priv; @@ -269,20 +269,12 @@ pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointe } xmlFree (primary); - /* Other properties */ - label = xmlGetProp (root_node, (xmlChar*) "label"); - - priv->address = g_strdup ((gchar*) address); - priv->protocol = g_strdup ((gchar*) protocol); - priv->relation_type = g_strdup ((gchar*) rel); - priv->label = g_strdup ((gchar*) label); + priv->address = (gchar*) address; + priv->protocol = (gchar*) protocol; + priv->relation_type = (gchar*) rel; + priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label"); priv->is_primary = primary_bool; - xmlFree (address); - xmlFree (protocol); - xmlFree (rel); - xmlFree (label); - return TRUE; } |