Skip to content

Commit

Permalink
fix a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Jun 13, 2014
1 parent fc25beb commit c2819d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
{
Expand Down

0 comments on commit c2819d6

Please sign in to comment.