sprintf(fn_dir, "%s%c%s", dir, DIR_SEPARATOR, nextname);
/* Copy the file name, possibly including the path. */
- fns[n] = strdup(fn_dir);
+ fns[n] = gmx_strdup(fn_dir);
if (ffdir == NULL)
{
srenew(fns_short, n+1);
if (strcmp(dir, ".") == 0 || bEnvIsSet)
{
- fns_short[n] = strdup(fn_dir);
+ fns_short[n] = gmx_strdup(fn_dir);
}
else
{
- fns_short[n] = strdup(nextname);
+ fns_short[n] = gmx_strdup(nextname);
}
}
n++;
{
/* We have a match */
srenew(dns, n+1);
- dns[n] = strdup(f_short[i]);
+ dns[n] = gmx_strdup(f_short[i]);
n++;
}
}