From ee246d0e0519c6aa7cb0aea17ea92c9a5c2dc16f Mon Sep 17 00:00:00 2001 From: kpfleming Date: Sun, 2 Nov 2008 23:56:13 +0000 Subject: import gcc 4.3.2 warning fixes from trunk, with a few changes specific to this branch git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@153710 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_jabber.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'res/res_jabber.c') diff --git a/res/res_jabber.c b/res/res_jabber.c index 04194de26..d2ce3b156 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -987,8 +987,7 @@ static int aji_act_hook(void *data, int type, iks *node) sprintf(secret, "%s%s", pak->id, client->password); ast_sha1_hash(shasum, secret); handshake = NULL; - asprintf(&handshake, "%s", shasum); - if (handshake) { + if (asprintf(&handshake, "%s", shasum) >= 0) { aji_send_raw(client, handshake); ast_free(handshake); handshake = NULL; @@ -2755,8 +2754,7 @@ static int aji_create_client(char *label, struct ast_variable *var, int debug) } if (!strchr(client->user, '/') && !client->component) { /*client */ resource = NULL; - asprintf(&resource, "%s/asterisk", client->user); - if (resource) { + if (asprintf(&resource, "%s/asterisk", client->user) >= 0) { client->jid = iks_id_new(client->stack, resource); ast_free(resource); } @@ -2772,8 +2770,7 @@ static int aji_create_client(char *label, struct ast_variable *var, int debug) } if (!strchr(client->user, '/') && !client->component) { /*client */ resource = NULL; - asprintf(&resource, "%s/asterisk", client->user); - if (resource) { + if (asprintf(&resource, "%s/asterisk", client->user) >= 0) { client->jid = iks_id_new(client->stack, resource); ast_free(resource); } -- cgit v1.2.3