diff options
author | Mohammed Sadiq <sadiq@sadiqpk.org> | 2018-07-30 23:06:23 +0530 |
---|---|---|
committer | Mohammed Sadiq <sadiq@sadiqpk.org> | 2018-07-30 23:06:23 +0530 |
commit | f0ce956f73e139a1f076fe38e8e91e00ca270222 (patch) | |
tree | 1718640455b4d6e5ead41a6897bcccf273a96cb0 | |
parent | b5b0485bfe13b8c8ac6930436df4327803be27bc (diff) | |
download | glib-wip/sadiq/fixes.tar.gz |
grefstring: Avoid an unnecessary NUL assignmentwip/sadiq/fixes
The duped string is already NUL-terminated.
There is no need to do it again.
-rw-r--r-- | glib/grefstring.c | 1 |
1 files changed, 0 insertions, 1 deletions
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; } |