[almanah: 1/2] event-factories: Fix an incorrect string comparison



commit db67b33c43fd287097b13e4abb3c43afe6d39aff
Author: Philip Withnall <withnall endlessm com>
Date:   Thu May 9 00:59:42 2019 +0100

    event-factories: Fix an incorrect string comparison
    
    The sense of the comparison was the wrong way round because the return
    value of g_strcmp0() was being treated as a truthy value.
    
    Spotted by Milan Crha in
    https://gitlab.gnome.org/GNOME/almanah/merge_requests/3.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 src/event-factories/calendar-sources.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/event-factories/calendar-sources.c b/src/event-factories/calendar-sources.c
index eef577d..839a143 100644
--- a/src/event-factories/calendar-sources.c
+++ b/src/event-factories/calendar-sources.c
@@ -262,7 +262,7 @@ get_ecal_from_source (ESource             *esource,
        {
          ECalClient *client = E_CAL_CLIENT (l->data);
 
-         if (g_strcmp0 (e_source_get_uid (esource), e_source_get_uid (e_client_get_source (E_CLIENT 
(client)))))
+         if (g_str_equal (e_source_get_uid (esource), e_source_get_uid (e_client_get_source (E_CLIENT 
(client)))))
            {
              dprintf ("        load_esource: found existing source ... returning that\n");
 


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