summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-26 13:13:22 +0300
committermonsta <[email protected]>2016-01-26 13:13:22 +0300
commitebf820f112dd840b73183c693a832001f53b7bae (patch)
treec5afb9de9e2b6b3a2405bad2da4ad304a75a9fc4
parent1129e653f6e33ea34efe64601643fbbe9a9d6f28 (diff)
downloadcaja-ebf820f112dd840b73183c693a832001f53b7bae.tar.bz2
caja-ebf820f112dd840b73183c693a832001f53b7bae.tar.xz
use g_strcmp0 instead of strcmp
-rw-r--r--libcaja-private/caja-bookmark.c7
-rw-r--r--src/caja-application.c16
2 files changed, 11 insertions, 12 deletions
diff --git a/libcaja-private/caja-bookmark.c b/libcaja-private/caja-bookmark.c
index b80f1ddc..04a63242 100644
--- a/libcaja-private/caja-bookmark.c
+++ b/libcaja-private/caja-bookmark.c
@@ -32,7 +32,6 @@
#include <eel/eel-vfs-extensions.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
-#include <string.h>
#include <libcaja-private/caja-file.h>
#include <libcaja-private/caja-icon-names.h>
@@ -300,7 +299,7 @@ caja_bookmark_set_name (CajaBookmark *bookmark, const char *new_name)
g_return_val_if_fail (new_name != NULL, FALSE);
g_return_val_if_fail (CAJA_IS_BOOKMARK (bookmark), FALSE);
- if (strcmp (new_name, bookmark->details->name) == 0)
+ if (g_strcmp0 (new_name, bookmark->details->name) == 0)
{
return FALSE;
}
@@ -437,7 +436,7 @@ bookmark_file_changed_callback (CajaFile *file, CajaBookmark *bookmark)
{
display_name = caja_file_get_display_name (file);
- if (strcmp (bookmark->details->name, display_name) != 0)
+ if (g_strcmp0 (bookmark->details->name, display_name) != 0)
{
g_free (bookmark->details->name);
bookmark->details->name = display_name;
@@ -554,7 +553,7 @@ caja_bookmark_connect_file (CajaBookmark *bookmark)
caja_file_check_if_ready (bookmark->details->file, CAJA_FILE_ATTRIBUTE_INFO))
{
display_name = caja_file_get_display_name (bookmark->details->file);
- if (strcmp (bookmark->details->name, display_name) != 0)
+ if (g_strcmp0 (bookmark->details->name, display_name) != 0)
{
g_free (bookmark->details->name);
bookmark->details->name = display_name;
diff --git a/src/caja-application.c b/src/caja-application.c
index 29530071..cb016804 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -2164,11 +2164,11 @@ caja_application_load_session (CajaApplication *application)
for (node = root_node->children; node != NULL; node = node->next)
{
- if (!strcmp (node->name, "text"))
+ if (g_strcmp0 (node->name, "text") == 0)
{
continue;
}
- else if (!strcmp (node->name, "history"))
+ else if (g_strcmp0 (node->name, "history") == 0)
{
xmlNodePtr bookmark_node;
gboolean emit_change;
@@ -2177,11 +2177,11 @@ caja_application_load_session (CajaApplication *application)
for (bookmark_node = node->children; bookmark_node != NULL; bookmark_node = bookmark_node->next)
{
- if (!strcmp (bookmark_node->name, "text"))
+ if (g_strcmp0 (bookmark_node->name, "text") == 0)
{
continue;
}
- else if (!strcmp (bookmark_node->name, "bookmark"))
+ else if (g_strcmp0 (bookmark_node->name, "bookmark") == 0)
{
xmlChar *name, *icon_str, *uri;
gboolean has_custom_name;
@@ -2224,7 +2224,7 @@ caja_application_load_session (CajaApplication *application)
caja_send_history_list_changed ();
}
}
- else if (!strcmp (node->name, "window"))
+ else if (g_strcmp0 (node->name, "window") == 0)
{
CajaWindow *window;
xmlChar *type, *location_uri, *slot_uri;
@@ -2249,7 +2249,7 @@ caja_application_load_session (CajaApplication *application)
continue;
}
- if (!strcmp (type, "navigation"))
+ if (g_strcmp0 (type, "navigation") == 0)
{
xmlChar *geometry;
@@ -2296,7 +2296,7 @@ caja_application_load_session (CajaApplication *application)
for (i = 0, slot_node = node->children; slot_node != NULL; slot_node = slot_node->next)
{
- if (!strcmp (slot_node->name, "slot"))
+ if (g_strcmp0 (slot_node->name, "slot") == 0)
{
slot_uri = xmlGetProp (slot_node, "location");
if (slot_uri != NULL)
@@ -2334,7 +2334,7 @@ caja_application_load_session (CajaApplication *application)
g_object_unref (location);
}
}
- else if (!strcmp (type, "spatial"))
+ else if (g_strcmp0 (type, "spatial") == 0)
{
location = g_file_new_for_uri (location_uri);
window = caja_application_get_spatial_window (application, NULL, NULL,