summaryrefslogtreecommitdiff
path: root/res/res_jabber.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-11-02 18:52:13 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-11-02 18:52:13 +0000
commitbd4eb070f3b292617be20bda069cac47df2f7495 (patch)
treea3750d996d41e35c5df34c29533dd7d9fdcaff24 /res/res_jabber.c
parent1e6864dd9d894db29ebc350b015e9eb58226a021 (diff)
bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_jabber.c')
-rw-r--r--res/res_jabber.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c
index 38b1b5959..ebb1059f5 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, "<handshake>%s</handshake>", shasum);
- if (handshake) {
+ if (asprintf(&handshake, "<handshake>%s</handshake>", 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);
}