remove bad form in if statement
authorRosen Penev <rosenp@gmail.com>
Sat, 3 Jun 2023 13:52:00 +0000 (06:52 -0700)
committerColin Clark <colin.clark@cclark.uk>
Sun, 4 Jun 2023 10:09:12 +0000 (11:09 +0100)
clang-tidy suggests braces here. instead of that, fix the condition

Signed-off-by: Rosen Penev <rosenp@gmail.com>
src/ui-bookmark.cc

index 162f947..8794898 100644 (file)
@@ -538,7 +538,7 @@ static void bookmark_populate(BookMarkData *bm)
                        history_list_add_to_key(bm->key, buf, 0);
                        g_free(buf);
 
-                       if (!g_strcmp0(bm->key, "shortcuts") == 0)
+                       if (g_strcmp0(bm->key, "shortcuts") != 0)
                                {
                                buf = bookmark_string(".", g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
                                history_list_add_to_key(bm->key, buf, 0);
@@ -567,7 +567,7 @@ static void bookmark_populate(BookMarkData *bm)
 
                        if (strcmp(name, ".") == 0)
                                {
-                               if (!g_strcmp0(bm->key, "shortcuts") == 0)
+                               if (g_strcmp0(bm->key, "shortcuts") != 0)
                                        {
                                        buf = bookmark_string(name, g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
                                        }