summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2023-02-17 19:26:03 +0100
committerTim Rühsen <tim.ruehsen@gmx.de>2023-02-18 17:25:56 +0100
commit77929eda1b9fe426e0fb45046ac2ea7f7ae92879 (patch)
tree7d61bf029e19f02e57ff390ca8365040ad8f4c34 /src/main.c
parent218f6fee30f8138e049ec624ef05456bd5d9e662 (diff)
downloadwget-77929eda1b9fe426e0fb45046ac2ea7f7ae92879.tar.gz
Simplify url_error function.
* src/url.c (url_error): simplify, remove url arg, return const char *. * src/url.h (url_error): remove url arg, return const char *. * src/html-url.c (get_urls_file): Simplify call to url_error(), remove call to free(). * src/http.c (metalink_from_http): Likewise. * src/main.c (main): Likewise. * src/metalink.c (retrieve_from_metalink, fetch_metalink_file): Likewise. * src/recur.c (retrieve_tree): Likewise. * src/res.c (res_retrieve_file): Likewise. * src/retr.c (retrieve_url, retrieve_from_file): Likewise.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 87fa2e09..d1c3c3e7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2135,9 +2135,7 @@ only if outputting to a regular file.\n"));
if (!url_parsed)
{
- char *error = url_error (t, url_err);
- logprintf (LOG_NOTQUIET, "%s: %s.\n",t, error);
- xfree (error);
+ logprintf (LOG_NOTQUIET, "%s: %s.\n", t, url_error (url_err));
inform_exit_status (URLERROR);
}
else