cli: remove an unnecessary condition

Do not check for password when creating a simple connection object for
"nmcli dev wifi connect".

This makes no difference in practice. The password is checked for
existence later on and the connection instance is created anyway. This
just makes things look a bit more consistent.
This commit is contained in:
Lubomir Rintel 2019-07-30 13:01:37 +02:00
parent cc3681c96c
commit 69ed759ddf

View file

@ -3410,7 +3410,7 @@ do_device_wifi_connect (NmCli *nmc, int argc, char **argv)
if (!existing_con) {
/* If there are some connection data from user, create a connection and
* fill them into proper settings. */
if (con_name || private || bssid2_arr || password || hidden)
if (con_name || private || bssid2_arr || hidden)
connection = nm_simple_connection_new ();
if (con_name || private) {