summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-11-06 14:11:04 +0100
committerThomas Haller <thaller@redhat.com>2016-11-09 12:07:35 +0100
commit01f0e35b6911f2793f618dfd0caa5b6d7efcc4a0 (patch)
tree364d90f32b515379e11db5e697d2d25a9668aa94
parent1b03b59ac0517a39ea383445ab0d2c6053737b03 (diff)
downloadNetworkManager-01f0e35b6911f2793f618dfd0caa5b6d7efcc4a0.tar.gz
ifcfg-rh: remove unused keyfile argument from writer_update_connection()
writer_update_connection() retrieves the keyfile name based on the ifcfg-name. No need to pass it in separately, the argument was unused.
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c2
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c6
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.h1
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c3
4 files changed, 2 insertions, 10 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
index 3877bb7305..ea8f337661 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
@@ -335,7 +335,6 @@ commit_changes (NMSettingsConnection *connection,
NMSettingsConnectionCommitFunc callback,
gpointer user_data)
{
- NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE ((NMIfcfgConnection *) connection);
GError *error = NULL;
NMConnection *reread;
gboolean same = FALSE, success = FALSE;
@@ -369,7 +368,6 @@ commit_changes (NMSettingsConnection *connection,
success = writer_update_connection (NM_CONNECTION (connection),
IFCFG_DIR,
filename,
- priv->keyfile,
&error);
} else {
success = writer_new_connection (NM_CONNECTION (connection),
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
index f098f1295e..d456f1a2a6 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
@@ -2700,7 +2700,6 @@ static gboolean
write_connection (NMConnection *connection,
const char *ifcfg_dir,
const char *filename,
- const char *keyfile,
char **out_filename,
GError **error)
{
@@ -2884,14 +2883,13 @@ writer_new_connection (NMConnection *connection,
char **out_filename,
GError **error)
{
- return write_connection (connection, ifcfg_dir, NULL, NULL, out_filename, error);
+ return write_connection (connection, ifcfg_dir, NULL, out_filename, error);
}
gboolean
writer_update_connection (NMConnection *connection,
const char *ifcfg_dir,
const char *filename,
- const char *keyfile,
GError **error)
{
if (utils_has_complex_routes (filename)) {
@@ -2900,6 +2898,6 @@ writer_update_connection (NMConnection *connection,
return FALSE;
}
- return write_connection (connection, ifcfg_dir, filename, keyfile, NULL, error);
+ return write_connection (connection, ifcfg_dir, filename, NULL, error);
}
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.h b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.h
index 97a9f25252..2662f79b06 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.h
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.h
@@ -34,7 +34,6 @@ gboolean writer_new_connection (NMConnection *connection,
gboolean writer_update_connection (NMConnection *connection,
const char *ifcfg_dir,
const char *filename,
- const char *keyfile,
GError **error);
#endif /* _WRITER_H_ */
diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
index 0e7140e629..e5a0e9d992 100644
--- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
@@ -1780,7 +1780,6 @@ test_clear_master (void)
success = writer_update_connection (connection,
TEST_SCRATCH_DIR "/network-scripts/",
testfile,
- NULL,
&error);
nmtst_assert_success (success, error);
keyfile = utils_get_keys_path (testfile);
@@ -6244,7 +6243,6 @@ test_write_wifi_wpa_then_open (void)
success = writer_update_connection (connection,
TEST_SCRATCH_DIR "/network-scripts/",
testfile,
- keyfile,
&error);
g_assert_no_error (error);
g_assert (success);
@@ -6392,7 +6390,6 @@ test_write_wifi_wpa_then_wep_with_perms (void)
success = writer_update_connection (connection,
TEST_SCRATCH_DIR "/network-scripts/",
testfile,
- keyfile,
&error);
g_assert_no_error (error);
g_assert (success);