Use weechat_strndup instead of strndup.

This commit is contained in:
Håvard Pettersson 2014-09-17 23:28:57 +02:00
parent a6ec60e3c0
commit 96b744c817

View file

@ -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 *full_path = tox_weechat_identity_data_file_path(identity);
char *rightmost_slash = strrchr(full_path, '/'); 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); weechat_mkdir_parents(save_dir, 0755);
free(save_dir); free(save_dir);