From dd8adde3866ac22bd510348b733bb29e1662ac6d Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 24 Jun 2010 05:00:50 +0200 Subject: *: introduce and use bb_unsetenv_and_free function old new delta bb_unsetenv_and_free - 17 +17 tcpudpsvd_main 1819 1810 -9 safe_setenv 58 47 -11 udhcp_run_script 630 616 -14 make_device 1683 1663 -20 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/4 up/down: 17/-54) Total: -37 bytes Signed-off-by: Denys Vlasenko --- util-linux/mdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'util-linux') diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 217075660..b4042c07e 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -374,10 +374,8 @@ static void make_device(char *path, int delete) putenv(s1); if (system(command) == -1) bb_perror_msg("can't run '%s'", command); - unsetenv("SUBSYSTEM"); - free(s1); - unsetenv("MDEV"); - free(s); + bb_unsetenv_and_free(s1); + bb_unsetenv_and_free(s); free(command); } -- cgit v1.2.3