aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-04-07 12:10:34 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-04-07 12:10:34 +0000
commitd98869a0889195a9e0d353cf691219f78186ac93 (patch)
tree85ae025549007e224e39c6fa95bbc5d0a65fcd29
parent4d33cf739da2649d3a8c363572cdb386b0f743b9 (diff)
minor re-arrange to return a value in order to avoid compiler warnings
for not returning a value from a non-void function (even though the code never actually reached that point before)
-rw-r--r--src/urlglob.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/urlglob.c b/src/urlglob.c
index 0b7273f36..d5d3f4eae 100644
--- a/src/urlglob.c
+++ b/src/urlglob.c
@@ -61,6 +61,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
/* processes a set expression with the point behind the opening '{'
','-separated elements are collected until the next closing '}'
*/
+ bool done = FALSE;
char* buf = glob->glob_buffer;
URLPattern *pat;
@@ -72,7 +73,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
pat->content.Set.elements = (char**)malloc(0);
++glob->size;
- while (1) {
+ while (!done) {
bool skip;
switch (*pattern) {
@@ -110,7 +111,8 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
wordamount=1;
*amount = pat->content.Set.size * wordamount;
- return GLOB_OK;
+ done = TRUE;
+ continue;
}
buf = glob->glob_buffer;
@@ -151,7 +153,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
++pos;
}
}
- /* we never reach this point */
+ return GLOB_OK;
}
static GlobCode glob_range(URLGlob *glob, char *pattern,