[network-manager-openswan/dcbw/cleanups: 6/23] trivial: use g_set_error_literal() where appropriate
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openswan/dcbw/cleanups: 6/23] trivial: use g_set_error_literal() where appropriate
- Date: Mon, 29 Sep 2014 17:32:54 +0000 (UTC)
commit 93f225d1ec43185ec8d1ccc8f018efeb584c8800
Author: Dan Williams <dcbw redhat com>
Date: Mon Aug 4 15:40:13 2014 -0500
trivial: use g_set_error_literal() where appropriate
src/nm-openswan-service.c | 54 ++++++++++++++++++++-------------------------
1 files changed, 24 insertions(+), 30 deletions(-)
---
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index 82b1469..48a256d 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -176,11 +176,10 @@ nm_openswan_properties_validate (NMSettingVPN *s_vpn, GError **error)
nm_setting_vpn_foreach_data_item (s_vpn, validate_one_property, &info);
if (!info.have_items) {
- g_set_error (error,
- NM_VPN_PLUGIN_ERROR,
- NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
- "%s",
- "No VPN configuration options.");
+ g_set_error_literal (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
+ "No VPN configuration options.");
return FALSE;
}
@@ -194,11 +193,10 @@ nm_openswan_secrets_validate (NMSettingVPN *s_vpn, GError **error)
nm_setting_vpn_foreach_secret (s_vpn, validate_one_property, &info);
if (!info.have_items) {
- g_set_error (error,
- NM_VPN_PLUGIN_ERROR,
- NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
- "%s",
- "No VPN secrets!");
+ g_set_error_literal (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
+ "No VPN secrets!");
return FALSE;
}
@@ -279,11 +277,10 @@ nm_openswan_start_openswan_binary (NMOPENSWANPlugin *plugin, GError **error)
}
if (!*openswan_binary) {
- g_set_error (error,
- NM_VPN_PLUGIN_ERROR,
- NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
- "%s",
- "Could not find openswan binary.");
+ g_set_error_literal (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
+ "Could not find openswan binary.");
return -1;
}
@@ -351,11 +348,10 @@ nm_openswan_start_openswan_connection (NMOPENSWANPlugin *plugin, GError **error)
}
if (!*openswan_binary) {
- g_set_error (error,
- NM_VPN_PLUGIN_ERROR,
- NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
- "%s",
- "Could not find openswan binary.");
+ g_set_error_literal (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
+ "Could not find openswan binary.");
return -1;
}
@@ -682,11 +678,10 @@ real_need_secrets (NMVPNPlugin *plugin,
s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN));
if (!s_vpn) {
- g_set_error (error,
- NM_VPN_PLUGIN_ERROR,
- NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
- "%s",
- "Could not process the request because the VPN connection settings were
invalid.");
+ g_set_error_literal (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
+ "Could not process the request because the VPN connection settings were
invalid.");
return FALSE;
}
@@ -738,11 +733,10 @@ real_disconnect (NMVPNPlugin *plugin,
}
if (!*openswan_binary) {
- g_set_error (error,
- NM_VPN_PLUGIN_ERROR,
- NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
- "%s",
- "Could not find openswan binary.");
+ g_set_error_literal (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
+ "Could not find openswan binary.");
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]