From f0ce956f73e139a1f076fe38e8e91e00ca270222 Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Mon, 30 Jul 2018 23:06:23 +0530 Subject: [PATCH] grefstring: Avoid an unnecessary NUL assignment The duped string is already NUL-terminated. There is no need to do it again. --- glib/grefstring.c | 1 - 1 file changed, 1 deletion(-) diff --git a/glib/grefstring.c b/glib/grefstring.c index f3ed4df72..56a6181fc 100644 --- a/glib/grefstring.c +++ b/glib/grefstring.c @@ -125,7 +125,6 @@ g_ref_string_new (const char *str) len = strlen (str); res = (char *) g_atomic_rc_box_dup (sizeof (char) * len + 1, str); - res[len] = '\0'; return res; }