I'm trying to remove a string from a pointer pointer char (char **str), my function removes the string and make duplicates of the remaining strings.
void remove_dup(char **split, char *name)
{
char **sp;
sp = split;
while (*sp != NULL)
{
if (strncmp(*sp, name, strlen(name)) == 0)
{
*sp = *(sp + 1);
sp++;
}
else
sp++;
}
}
namefrom the list.