From b28b15893e876b79aa2c30bd9f302e74d0241234 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Fri, 25 Sep 2020 17:48:21 -0400 Subject: [PATCH] swtpm_setup: Remove dead code part passwd is always NULL since recent changes and the removed part is basically always dead. Signed-off-by: Stefan Berger --- src/swtpm_setup/swtpm_setup.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/swtpm_setup/swtpm_setup.c b/src/swtpm_setup/swtpm_setup.c index 8630dcd1d..21bb5d3fc 100644 --- a/src/swtpm_setup/swtpm_setup.c +++ b/src/swtpm_setup/swtpm_setup.c @@ -177,7 +177,6 @@ int main(int argc, char *argv[]) char *dir; char *path_program; size_t length; - struct passwd *passwd = NULL; int i = 1, j; const char *userid = NULL; bool change_user = true; @@ -286,11 +285,6 @@ int main(int argc, char *argv[]) */ execv(path_program, argv); - if (passwd) { - /* should never get here */ - fprintf(stderr, "As user %s:", passwd->pw_name); - } - fprintf(stderr, "Could not execute '%s' : %s\n", path_program, strerror(errno));