[libgdata] [core] Remove unnecessary preconditions in internal functions
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] [core] Remove unnecessary preconditions in internal functions
- Date: Thu, 25 Mar 2010 13:39:05 +0000 (UTC)
commit c9dc64a56aa098a5dff2b1317d2916d182932619
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Mar 25 13:38:32 2010 +0000
[core] Remove unnecessary preconditions in internal functions
gdata/gdata-entry.c | 4 ----
gdata/gdata-feed.c | 12 +-----------
2 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c
index d919f8b..1d1b6c7 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -358,10 +358,6 @@ gdata_entry_set_property (GObject *object, guint property_id, const GValue *valu
static gboolean
pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
{
- g_return_val_if_fail (GDATA_IS_ENTRY (parsable), FALSE);
- g_return_val_if_fail (doc != NULL, FALSE);
- g_return_val_if_fail (root_node != NULL, FALSE);
-
/* Extract the ETag */
GDATA_ENTRY (parsable)->priv->etag = (gchar*) xmlGetProp (root_node, (xmlChar*) "etag");
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index 3766a73..40ed6fa 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -380,10 +380,6 @@ typedef struct {
static gboolean
pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
{
- g_return_val_if_fail (GDATA_IS_FEED (parsable), FALSE);
- g_return_val_if_fail (doc != NULL, FALSE);
- g_return_val_if_fail (root_node != NULL, FALSE);
-
/* Extract the ETag */
GDATA_FEED (parsable)->priv->etag = (gchar*) xmlGetProp (root_node, (xmlChar*) "etag");
@@ -402,15 +398,9 @@ static gboolean
parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
{
gboolean success;
- GDataFeed *self;
+ GDataFeed *self = GDATA_FEED (parsable);
ParseData *data = user_data;
- g_return_val_if_fail (GDATA_IS_FEED (parsable), FALSE);
- g_return_val_if_fail (doc != NULL, FALSE);
- g_return_val_if_fail (node != NULL, FALSE);
-
- self = GDATA_FEED (parsable);
-
if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE) {
if (xmlStrcmp (node->name, (xmlChar*) "entry") == 0) {
/* atom:entry */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]