[glib/glib-2-24] g_string_append_len() accept NULL with length == 0 (cherry picked from commit 056326c1e96db2c2101fa3
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-24] g_string_append_len() accept NULL with length == 0 (cherry picked from commit 056326c1e96db2c2101fa3
- Date: Mon, 3 May 2010 00:58:42 +0000 (UTC)
commit e7a7d6873cb49f6c8bba5c2a5d078dbe607d62bd
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Apr 15 10:11:30 2010 -0400
g_string_append_len() accept NULL with length == 0
(cherry picked from commit 056326c1e96db2c2101fa320062e0c9146f0d73f)
glib/gstring.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gstring.c b/glib/gstring.c
index aaff031..ef2215c 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -874,7 +874,7 @@ g_string_append_len (GString *string,
gssize len)
{
g_return_val_if_fail (string != NULL, NULL);
- g_return_val_if_fail (val != NULL, string);
+ g_return_val_if_fail (len == 0 || val != NULL, string);
return g_string_insert_len (string, -1, val, len);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]