diff --git a/examples/active.c b/examples/active.c index 3e72373..0ce5def 100644 --- a/examples/active.c +++ b/examples/active.c @@ -30,7 +30,7 @@ int handle_reply(xmpp_conn_t * const conn, char *type; type = xmpp_stanza_get_type(stanza); - if (strcmp("type", "error") == 0) + if (strcmp(type, "error") == 0) fprintf(stderr, "ERROR: query failed\n"); else { query = xmpp_stanza_get_child_by_name(stanza, "query"); diff --git a/examples/roster.c b/examples/roster.c index 8503310..5e90163 100644 --- a/examples/roster.c +++ b/examples/roster.c @@ -29,7 +29,7 @@ int handle_reply(xmpp_conn_t * const conn, char *type, *name; type = xmpp_stanza_get_type(stanza); - if (strcmp("type", "error") == 0) + if (strcmp(type, "error") == 0) fprintf(stderr, "ERROR: query failed\n"); else { query = xmpp_stanza_get_child_by_name(stanza, "query");