diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2014-12-14 22:45:06 +0100 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2014-12-14 22:45:06 +0100 |
commit | d8efde07e556c42ee35ddc0bcc6daf4d13c948a9 (patch) | |
tree | 9fcbbfd4c218b7e010a4b35c5c14c4205e893f70 /src | |
parent | 2ffbd7afacf558af79c9f06f888f94a2699900c7 (diff) | |
download | curl-d8efde07e556c42ee35ddc0bcc6daf4d13c948a9.tar.gz |
tool_urlglob.c: Silence warning C6293: Ill-defined for-loop
The >= 0 is actually not required, since i underflows and
the for-loop is stopped using the < condition, but this
makes the VS2012 compiler and code analysis happy.
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_urlglob.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 36e83c330..9dace458d 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -466,7 +466,7 @@ void glob_cleanup(URLGlob* glob) int elem; /* the < condition is required since i underflows! */ - for(i = glob->size - 1; i < glob->size; --i) { + for(i = glob->size - 1; i >= 0 && i < glob->size; --i) { if((glob->pattern[i].type == UPTSet) && (glob->pattern[i].content.Set.elements)) { for(elem = glob->pattern[i].content.Set.size - 1; @@ -500,7 +500,7 @@ int glob_next_url(char **globbed, URLGlob *glob) /* implement a counter over the index ranges of all patterns, starting with the rightmost pattern */ /* the < condition is required since i underflows! */ - for(i = glob->size - 1; carry && (i < glob->size); --i) { + for(i = glob->size - 1; carry && i >= 0 && (i < glob->size); --i) { carry = FALSE; pat = &glob->pattern[i]; switch (pat->type) { |