X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=util.c;h=f16a378b307ae5468a332bd0427828acec044ff8;hp=09f18171cede5399a020610050b9f202dd476ee7;hb=b342283d2dda28083322e99ffae874ba92839c74;hpb=471dcf63d6ed4689cfd56f2648e6d1b48f46f14c diff --git a/util.c b/util.c index 09f1817..f16a378 100644 --- a/util.c +++ b/util.c @@ -89,12 +89,10 @@ bool uci_validate_text(const char *str) { while (*str) { unsigned char c = *str; - if (((c < 32) && - (c != '\t') && - (c != '\n') && - (c != '\r'))) { + + if (c < 32 && c != '\t' && c != '\n' && c != '\r') return false; - } + str++; } return true;