From da9212667c99f2f2121747c4715d067deb7c155b Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Mon, 5 Jan 2015 15:37:58 +0100
Subject: libbb: code shrink by factoring out common update_utmp_DEAD_PROCESS

function                                             old     new   delta
update_utmp_DEAD_PROCESS                               -      17     +17
telnetd_main                                        1685    1674     -11
mark_terminated                                       56      45     -11
handle_sigchld                                        74      63     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 init/init.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'init')

diff --git a/init/init.c b/init/init.c
index d99d68ce4..b2fe85635 100644
--- a/init/init.c
+++ b/init/init.c
@@ -538,11 +538,7 @@ static struct init_action *mark_terminated(pid_t pid)
 	struct init_action *a;
 
 	if (pid > 0) {
-		update_utmp(pid, DEAD_PROCESS,
-				/*tty_name:*/ NULL,
-				/*username:*/ NULL,
-				/*hostname:*/ NULL
-		);
+		update_utmp_DEAD_PROCESS(pid);
 		for (a = init_action_list; a; a = a->next) {
 			if (a->pid == pid) {
 				a->pid = 0;
-- 
cgit v1.2.3-55-g6feb