diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2023-02-17 19:26:03 +0100 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2023-02-18 17:25:56 +0100 |
commit | 77929eda1b9fe426e0fb45046ac2ea7f7ae92879 (patch) | |
tree | 7d61bf029e19f02e57ff390ca8365040ad8f4c34 /src/main.c | |
parent | 218f6fee30f8138e049ec624ef05456bd5d9e662 (diff) | |
download | wget-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 |