aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
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