aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2021-07-07 14:22:52 +0200
committerLouis Burda <quent.burda@gmail.com>2021-07-07 14:22:52 +0200
commit3139342aa61d78985298d7450f97513a8aeec681 (patch)
tree6ac6b1fb853234760e0d44f7f8422620e49b1416 /src/util.c
parent8ee81f0d908bee3991248d3c86e5ce0ab2219a05 (diff)
downloadenowars5-service-stldoctor-3139342aa61d78985298d7450f97513a8aeec681.tar.gz
enowars5-service-stldoctor-3139342aa61d78985298d7450f97513a8aeec681.zip
added .index file for upload and search
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index 7a57d38..241c2f4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -67,12 +67,12 @@ mhash(const char *str, int len)
int
checkalph(const char *str, const char *alph)
{
- int i;
+ const char *c;
- for (i = 0; i < strlen(str); i++)
- if (str[i] && !strchr(alph, str[i])) return 0;
+ for (c = str; *c; c++)
+ if (!strchr(alph, *c)) return FAIL;
- return 1;
+ return OK;
}
void