Use weechat_strndup instead of strndup.
This commit is contained in:
parent
a6ec60e3c0
commit
96b744c817
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue