projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
overhaul package and section type validation - makes it easier to read and fixes...
[project/uci.git]
/
util.c
diff --git
a/util.c
b/util.c
index
177bd14
..
e56992e
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-96,6
+96,16
@@
__plugin bool uci_validate_str(const char *str, bool name)
return true;
}
return true;
}
+static inline bool uci_validate_package(const char *str)
+{
+ return uci_validate_str(str, false);
+}
+
+static inline bool uci_validate_type(const char *str)
+{
+ return uci_validate_str(str, false);
+}
+
static inline bool uci_validate_name(const char *str)
{
return uci_validate_str(str, true);
static inline bool uci_validate_name(const char *str)
{
return uci_validate_str(str, true);
@@
-159,7
+169,7
@@
int uci_parse_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str)
goto error;
lastval:
goto error;
lastval:
- if (ptr->package && !uci_validate_
str(ptr->package, fals
e))
+ if (ptr->package && !uci_validate_
package(ptr->packag
e))
goto error;
if (ptr->section && !uci_validate_name(ptr->section))
ptr->flags |= UCI_LOOKUP_EXTENDED;
goto error;
if (ptr->section && !uci_validate_name(ptr->section))
ptr->flags |= UCI_LOOKUP_EXTENDED;