From c2819d62433eaef7a23023184b88cc31a3f1992d Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 13 Jun 2014 08:51:34 +0800 Subject: [PATCH] fix a warning --- src/acl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/acl.c b/src/acl.c index 6e778969..553ba163 100644 --- a/src/acl.c +++ b/src/acl.c @@ -123,14 +123,15 @@ int acl_contains_domain(const char* domain) const char **list = acl_domain_array.items; const int size = acl_domain_array.size; const int domain_len = strlen(domain); + int i, offset; - for (int i = 0; i < size; i++) + for (i = 0; i < size; i++) { const char *acl_domain = list[i]; const int acl_domain_len = strlen(acl_domain); if (acl_domain_len > domain_len) continue; int match = true; - for (int offset = 1; offset <= acl_domain_len; offset++) + for (offset = 1; offset <= acl_domain_len; offset++) { if (domain[domain_len - offset] != acl_domain[acl_domain_len - offset]) {