[network-manager-applet] libnm: use NM_IN_STRSET() macro in is_this_a_slot_nobody_loves()



commit a97901c46f7b88a3b1ecd30e21b47774cf456e47
Author: Thomas Haller <thaller redhat com>
Date:   Mon Jun 19 11:21:53 2017 +0200

    libnm: use NM_IN_STRSET() macro in is_this_a_slot_nobody_loves()

 src/libnma/nma-cert-chooser-button.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libnma/nma-cert-chooser-button.c b/src/libnma/nma-cert-chooser-button.c
index b87ae57..c708939 100644
--- a/src/libnma/nma-cert-chooser-button.c
+++ b/src/libnma/nma-cert-chooser-button.c
@@ -61,17 +61,17 @@ static gboolean
 is_this_a_slot_nobody_loves (GckSlot *slot)
 {
        GckSlotInfo *slot_info;
-        gboolean ret_value = FALSE;
+       gboolean ret_value = FALSE;
 
        slot_info = gck_slot_get_info (slot);
 
        /* The p11-kit CA trusts do use their filesystem paths for description. */
        if (g_str_has_prefix (slot_info->slot_description, "/"))
                ret_value = TRUE;
-
-       if (   strcmp (slot_info->slot_description, "SSH Keys") == 0
-           || strcmp (slot_info->slot_description, "Secret Store") == 0
-           || strcmp (slot_info->slot_description, "User Key Storage") == 0)
+       else if (NM_IN_STRSET (slot_info->slot_description,
+                              "SSH Keys",
+                              "Secret Store",
+                              "User Key Storage"))
                ret_value = TRUE;
 
        gck_slot_info_free (slot_info);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]