[gtk+] Avoid a redundant strlen



commit cc8ee01ff67b3eaf1c4df97e9a45b2bdfde77dac
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 28 01:51:24 2014 -0400

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkbookmarksmanager.c b/gtk/gtkbookmarksmanager.c
index 197c4ce..968b49c 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;


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