fix compiler error under linux
[project/uci.git] / util.c
diff --git a/util.c b/util.c
index ddb1331..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;
 }
 
-static bool uci_validate_name(char *str)
+static bool uci_validate_name(const char *str)
 {
        if (!*str)
                return false;
@@ -97,6 +97,7 @@ lastval:
                last++;
                if (!*last)
                        goto error;
+               *value = last;
        }
 
        if (*section && !uci_validate_name(*section))