about summary refs log tree commit diff stats
path: root/src/xmpp/stanza.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-26 00:36:36 +0100
committerJames Booth <boothj5@gmail.com>2014-04-26 00:36:36 +0100
commitd6e92f62dc907d5da66f477884a4c0c728b84127 (patch)
treee77d8ad400874baa5edd7dde9ce66b1847fd89e9 /src/xmpp/stanza.c
parentab4ea80a70803d8d6335d8f5a8a4248e6d5423a4 (diff)
downloadprofani-tty-d6e92f62dc907d5da66f477884a4c0c728b84127.tar.gz
Fixed cppcheck warnings
Diffstat (limited to 'src/xmpp/stanza.c')
-rw-r--r--src/xmpp/stanza.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 8000da62..3c3f47fb 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -830,62 +830,6 @@ stanza_contains_caps(xmpp_stanza_t * const stanza)
     return TRUE;
 }
 
-gboolean
-stanza_is_version_request(xmpp_stanza_t * const stanza)
-{
-    char *type = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_TYPE);
-
-    if (g_strcmp0(type, STANZA_TYPE_GET) != 0) {
-        return FALSE;
-    }
-
-    xmpp_stanza_t *query = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_QUERY);
-
-    if (query == NULL) {
-        return FALSE;
-    }
-
-    char *ns = xmpp_stanza_get_ns(query);
-
-    if (ns == NULL) {
-        return FALSE;
-    }
-
-    if (strcmp(ns, STANZA_NS_VERSION) != 0) {
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-gboolean
-stanza_is_caps_request(xmpp_stanza_t * const stanza)
-{
-    char *type = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_TYPE);
-
-    if (g_strcmp0(type, STANZA_TYPE_GET) != 0) {
-        return FALSE;
-    }
-
-    xmpp_stanza_t *query = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_QUERY);
-
-    if (query == NULL) {
-        return FALSE;
-    }
-
-    char *ns = xmpp_stanza_get_ns(query);
-
-    if (ns == NULL) {
-        return FALSE;
-    }
-
-    if (strcmp(ns, XMPP_NS_DISCO_INFO) != 0) {
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
 char *
 stanza_caps_get_hash(xmpp_stanza_t * const stanza)
 {
@@ -957,8 +901,6 @@ stanza_get_error_message(xmpp_stanza_t *stanza)
 
         // otherwise check each defined-condition RFC-6120 8.3.3
         } else {
-            xmpp_stanza_t *cond_stanza = NULL;
-
             gchar *defined_conditions[] = {
                 STANZA_NAME_BAD_REQUEST,
                 STANZA_NAME_CONFLICT,
@@ -985,7 +927,7 @@ stanza_get_error_message(xmpp_stanza_t *stanza)
 
             int i;
             for (i = 0; i < ARRAY_SIZE(defined_conditions); i++) {
-                cond_stanza = xmpp_stanza_get_child_by_name(error_stanza, defined_conditions[i]);
+                xmpp_stanza_t *cond_stanza = xmpp_stanza_get_child_by_name(error_stanza, defined_conditions[i]);
                 if (cond_stanza != NULL) {
                     char *result = strdup(xmpp_stanza_get_name(cond_stanza));
                     return result;