Hey,

This patch replaces the prefix in the log functions to __func__.


diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c
index 40464012814..5965e3ded4d 100644
--- a/usr.sbin/httpd/httpd.c
+++ b/usr.sbin/httpd/httpd.c
@@ -791,7 +791,7 @@ socket_rlimit(int maxfd)
        struct rlimit    rl;
 
        if (getrlimit(RLIMIT_NOFILE, &rl) == -1)
-               fatal("socket_rlimit: failed to get resource limit");
+               fatal("%s: failed to get resource limit", __func__);
        log_debug("%s: max open files %llu", __func__, rl.rlim_max);
 
        /*
@@ -803,7 +803,7 @@ socket_rlimit(int maxfd)
        else
                rl.rlim_cur = MAXIMUM(rl.rlim_max, (rlim_t)maxfd);
        if (setrlimit(RLIMIT_NOFILE, &rl) == -1)
-               fatal("socket_rlimit: failed to set resource limit");
+               fatal("%s: failed to set resource limit", __func__);
 }
 
 char *
diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c
index 7ddc01e8462..665ef5c89b3 100644
--- a/usr.sbin/httpd/proc.c
+++ b/usr.sbin/httpd/proc.c
@@ -505,7 +505,7 @@ proc_sig_handler(int sig, short event, void *arg)
                /* ignore */
                break;
        default:
-               fatalx("proc_sig_handler: unexpected signal");
+               fatalx("%s: unexpected signal", __func__);
                /* NOTREACHED */
        }
 }
@@ -545,9 +545,9 @@ proc_run(struct privsep *ps, struct privsep_proc *p,
                root = pw->pw_dir;
 
        if (chroot(root) == -1)
-               fatal("proc_run: chroot");
+               fatal("%s: chroot", __func__);
        if (chdir("/") == -1)
-               fatal("proc_run: chdir(\"/\")");
+               fatal("%s: chdir(\"/\")", __func__);
 
        privsep_process = p->p_id;
 
@@ -556,7 +556,7 @@ proc_run(struct privsep *ps, struct privsep_proc *p,
        if (setgroups(1, &pw->pw_gid) ||
            setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||
            setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
-               fatal("proc_run: cannot drop privileges");
+               fatal("%s: cannot drop privileges", __func__);
 
        event_init();
 
-- 
Kind regards,
Hiltjo

Reply via email to