return ptr;
}
-static bool validate_name(char *str)
+static bool uci_validate_name(char *str)
{
if (!*str)
return false;
UCI_ASSERT(ctx, str && package && section && option);
*package = strtok(str, ".");
- if (!*package || !validate_name(*package))
+ if (!*package || !uci_validate_name(*package))
goto error;
last = *package;
last++;
if (!*last)
goto error;
+ *value = last;
}
- if (*section && !validate_name(*section))
+ if (*section && !uci_validate_name(*section))
goto error;
- if (*option && !validate_name(*option))
+ if (*option && !uci_validate_name(*option))
goto error;
goto done;