X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fhtml-url.c;h=95df8bf98e35b5d93b21da4003326fa5539b45f7;hb=123f5c39669abc055987d69a311785c861494c87;hp=c9cf28f6df39fd470966b236b13d16c7e0f184b0;hpb=caae3b70f46bd519857b595f7f06ea0179551336;p=wget diff --git a/src/html-url.c b/src/html-url.c index c9cf28f6..95df8bf9 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -186,7 +186,7 @@ init_interesting (void) matches the user's preferences as specified through --ignore-tags and --follow-tags. */ - int i; + size_t i; interesting_tags = make_nocase_string_hash_table (countof (known_tags)); /* First, add all the tags we know hot to handle, mapped to their @@ -360,7 +360,8 @@ check_style_attr (struct taginfo *tag, struct map_context *ctx) static void tag_find_urls (int tagid, struct taginfo *tag, struct map_context *ctx) { - int i, attrind; + size_t i; + int attrind; int first = -1; for (i = 0; i < countof (tag_url_attributes); i++) @@ -387,7 +388,7 @@ tag_find_urls (int tagid, struct taginfo *tag, struct map_context *ctx) /* Find whether TAG/ATTRIND is a combination that contains a URL. */ char *link = tag->attrs[attrind].value; - const int size = countof (tag_url_attributes); + const size_t size = countof (tag_url_attributes); /* If you're cringing at the inefficiency of the nested loops, remember that they both iterate over a very small number of @@ -728,9 +729,11 @@ get_urls_file (const char *file) url = url_parse (url_text, &up_error_code); if (!url) { + char *error = url_error (url_text, up_error_code); logprintf (LOG_NOTQUIET, _("%s: Invalid URL %s: %s\n"), - file, url_text, url_error (up_error_code)); + file, url_text, error); xfree (url_text); + xfree (error); continue; } xfree (url_text);