fix accidental lowercasing of license headers
[project/uci.git] / util.c
diff --git a/util.c b/util.c
index 85e87ab..c0f4451 100644 (file)
--- a/util.c
+++ b/util.c
@@ -51,7 +51,7 @@ static char *uci_strdup(struct uci_context *ctx, const char *str)
        return ptr;
 }
 
        return ptr;
 }
 
-static bool validate_name(char *str)
+static bool uci_validate_name(const char *str)
 {
        if (!*str)
                return false;
 {
        if (!*str)
                return false;
@@ -72,7 +72,7 @@ int uci_parse_tuple(struct uci_context *ctx, char *str, char **package, char **s
        UCI_ASSERT(ctx, str && package && section && option);
 
        *package = strtok(str, ".");
        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;
                goto error;
 
        last = *package;
@@ -97,11 +97,12 @@ lastval:
                last++;
                if (!*last)
                        goto error;
                last++;
                if (!*last)
                        goto error;
+               *value = last;
        }
 
        }
 
-       if (*section && !validate_name(*section))
+       if (*section && !uci_validate_name(*section))
                goto error;
                goto error;
-       if (*option && !validate_name(*option))
+       if (*option && !uci_validate_name(*option))
                goto error;
 
        goto done;
                goto error;
 
        goto done;