Skip to content

Commit

Permalink
tool_urlglob.c: Added braces to clarify the conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Dec 14, 2014
1 parent d8efde0 commit 64854c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tool_urlglob.c
Expand Up @@ -466,7 +466,7 @@ void glob_cleanup(URLGlob* glob)
int elem;

/* the < condition is required since i underflows! */
for(i = glob->size - 1; i >= 0 && 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;
Expand Down Expand Up @@ -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 >= 0 && (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) {
Expand Down

0 comments on commit 64854c0

Please sign in to comment.