Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-01-13 14:56:10 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2022-01-13 14:56:10 +0300
commitc2788f88f430da8ae5fb5f293b13fc2b167ea2fe (patch)
tree44e3fd94292a3ef13ecdbf14d469459e00be1150 /networking
parent931c55f9e2b41473132683488820c6fb7c47506b (diff)
libbb: introduce and use chdir_or_warn()
function old new delta chdir_or_warn - 37 +37 send_cgi_and_exit 720 711 -9 xchdir 27 15 -12 setup_environment 233 217 -16 fork_job 449 433 -16 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/4 up/down: 37/-53) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index 33045163f..ffc58e10b 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1667,8 +1667,7 @@ static void send_cgi_and_exit(
script = last_slash;
if (script != url) { /* paranoia */
*script = '\0';
- if (chdir(url + 1) != 0) {
- bb_perror_msg("can't change directory to '%s'", url + 1);
+ if (chdir_or_warn(url + 1) != 0) {
goto error_execing_cgi;
}
// not needed: *script = '/';