diff options
author | Zdenek Styblik <stybla@turnovfree.net> | 2014-12-19 08:49:20 +0100 |
---|---|---|
committer | Zdenek Styblik <stybla@turnovfree.net> | 2014-12-19 08:49:20 +0100 |
commit | 50bd7d01a81ae82626281c470169544e86c360ce (patch) | |
tree | 9c7ba78a23d07212885858e8abe7dca5122e3e31 /lib/ipmi_user.c | |
parent | 4d3decc4c0a95264ddf45d55771c2d41c624d205 (diff) | |
download | ipmitool-50bd7d01a81ae82626281c470169544e86c360ce.tar.gz |
Don't use tmp variable since it's not necessary in ipmi_user_test()
Diffstat (limited to 'lib/ipmi_user.c')
-rw-r--r-- | lib/ipmi_user.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/ipmi_user.c b/lib/ipmi_user.c index 24e2828..fbe6d4c 100644 --- a/lib/ipmi_user.c +++ b/lib/ipmi_user.c @@ -573,18 +573,13 @@ ipmi_user_test(struct ipmi_intf *intf, int argc, char **argv) } if (argc == 3) { /* We need to prompt for a password */ - char *tmp; const char *password_prompt = ipmi_user_build_password_prompt(user_id); # ifdef HAVE_GETPASSPHRASE - tmp = getpassphrase(password_prompt); + password = getpassphrase(password_prompt); # else - tmp = (char*)getpass(password_prompt); + password = (char*)getpass(password_prompt); # endif - if (tmp != NULL) { - password = strdup(tmp); - tmp = NULL; - } if (password == NULL) { lprintf(LOG_ERR, "ipmitool: malloc failure"); return (-1); |