mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 09:02:13 +02:00
Use g_strndup, strndup is not available on old platforms
strndup is not available on Solaris 10, to ensure building is ok use glib function.
This commit is contained in:
parent
768658f5d5
commit
a3248d43ec
1 changed files with 1 additions and 1 deletions
|
|
@ -643,7 +643,7 @@ static enum otr_msg_status enqueue_otr_fragment(const char *msg, struct otr_peer
|
||||||
* Dup the string with enough space for the NULL byte since we are
|
* Dup the string with enough space for the NULL byte since we are
|
||||||
* about to free it before passing it to the caller.
|
* about to free it before passing it to the caller.
|
||||||
*/
|
*/
|
||||||
*full_msg = strndup(opc->full_msg, opc->msg_len + 1);
|
*full_msg = g_strndup(opc->full_msg, opc->msg_len + 1);
|
||||||
/* Reset everything. */
|
/* Reset everything. */
|
||||||
free(opc->full_msg);
|
free(opc->full_msg);
|
||||||
opc->full_msg = NULL;
|
opc->full_msg = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue