From 96b744c817310809284fa3deb4b70f8b2917887c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Wed, 17 Sep 2014 23:28:57 +0200 Subject: [PATCH] Use weechat_strndup instead of strndup. --- src/tox-weechat-identities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tox-weechat-identities.c b/src/tox-weechat-identities.c index 8ee54b1..5a30d3a 100644 --- a/src/tox-weechat-identities.c +++ b/src/tox-weechat-identities.c @@ -101,7 +101,7 @@ tox_weechat_save_identity_data_file(struct t_tox_weechat_identity *identity) char *full_path = tox_weechat_identity_data_file_path(identity); char *rightmost_slash = strrchr(full_path, '/'); - char *save_dir = strndup(full_path, rightmost_slash - full_path); + char *save_dir = weechat_strndup(full_path, rightmost_slash - full_path); weechat_mkdir_parents(save_dir, 0755); free(save_dir);