mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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
@ -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…
Reference in New Issue
Block a user