From cc8ee01ff67b3eaf1c4df97e9a45b2bdfde77dac Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 28 Jun 2014 01:51:24 -0400 Subject: [PATCH] Avoid a redundant strlen The GString knows perfectly well how long it is. Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=731158 --- gtk/gtkbookmarksmanager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkbookmarksmanager.c b/gtk/gtkbookmarksmanager.c index 197c4cee8a..968b49c525 100644 --- a/gtk/gtkbookmarksmanager.c +++ b/gtk/gtkbookmarksmanager.c @@ -160,7 +160,7 @@ save_bookmarks (GFile *bookmarks_file, } if (!g_file_replace_contents (bookmarks_file, contents->str, - strlen (contents->str), + contents->len, NULL, FALSE, 0, NULL, NULL, &error)) goto out;