mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-05 08:53:39 +02:00
grefstring: Avoid an unnecessary NUL assignment
The duped string is already NUL-terminated. There is no need to do it again.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user