Replace mstrcpy, mstrncpy with strdup, strndup

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2018-12-15 19:07:14 +00:00
parent b8912fa749
commit b73dce1d6d
7 changed files with 20 additions and 44 deletions

View File

@ -186,7 +186,7 @@ void parse_config_libconfig(session_t *ps, bool *shadow_enable,
{
// dirname() could modify the original string, thus we must pass a
// copy
char *path2 = mstrcpy(path);
char *path2 = strdup(path);
char *parent = dirname(path2);
if (parent)