Making bot.c compatible to C++

By this small type casting change, I am able to compile bot.c with both ``gcc`` as well as with ``g++``

I am now able to use bot.c in my c++ programs
This commit is contained in:
Tusharsb
2015-12-02 14:53:52 +05:30
parent 01af2deed9
commit 7bbfd00344

View File

@@ -84,7 +84,7 @@ int message_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void
body = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(body, "body");
replytext = malloc(strlen(" to you too!") + strlen(intext) + 1);
replytext = (char *) malloc(strlen(" to you too!") + strlen(intext) + 1);
strcpy(replytext, intext);
strcat(replytext, " to you too!");
xmpp_free(ctx, intext);