summaryrefslogtreecommitdiff
path: root/clients/common/nm-secret-agent-simple.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-01-22 10:28:20 +0100
committerThomas Haller <thaller@redhat.com>2019-02-05 08:22:01 +0100
commit378a4a8e1a58ac04758842a1a0a6ef117b562dca (patch)
treea2d1a1d1bd9384fcde2511a49c854ae356e9cd4c /clients/common/nm-secret-agent-simple.c
parentaaaa8902fd57b1fc85d0e495ddb76560e5b83b76 (diff)
downloadNetworkManager-378a4a8e1a58ac04758842a1a0a6ef117b562dca.tar.gz
clients/secret-agent: drop strv_has() implementation
Diffstat (limited to 'clients/common/nm-secret-agent-simple.c')
-rw-r--r--clients/common/nm-secret-agent-simple.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c
index 86bc092180..56d4a32361 100644
--- a/clients/common/nm-secret-agent-simple.c
+++ b/clients/common/nm-secret-agent-simple.c
@@ -111,20 +111,6 @@ _request_data_cancel (RequestData *request,
/*****************************************************************************/
-static gboolean
-strv_has (char **haystack,
- char *needle)
-{
- char **iter;
-
- for (iter = haystack; iter && *iter; iter++) {
- if (g_strcmp0 (*iter, needle) == 0)
- return TRUE;
- }
-
- return FALSE;
-}
-
/**
* NMSecretAgentSimpleSecret:
* @name: the user-visible name of the secret. Eg, "WEP Passphrase".
@@ -776,7 +762,7 @@ request_secrets_from_ui (RequestData *request)
} else if (nm_connection_is_type (request->connection, NM_SETTING_GSM_SETTING_NAME)) {
NMSettingGsm *s_gsm = nm_connection_get_setting_gsm (request->connection);
- if (strv_has (request->hints, "pin")) {
+ if (g_strv_contains (NM_CAST_STRV_CC (request->hints), "pin")) {
title = _("PIN code required");
msg = g_strdup (_("PIN code is needed for the mobile broadband device"));