Skip to content

Commit

Permalink
swtpm_setup: Remove dead code part
Browse files Browse the repository at this point in the history
passwd is always NULL since recent changes and the removed part
is basically always dead.

Signed-off-by: Stefan Berger <[email protected]>
  • Loading branch information
stefanberger committed Sep 26, 2020
1 parent 32bf621 commit b28b158
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/swtpm_setup/swtpm_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit b28b158

Please sign in to comment.