mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
small cleanup. (#433387)
2007-04-25 Paolo Borellki <pborelli@katamail.com> * glib/gstrfuncs.c (g_strsplit): small cleanup. (#433387) svn path=/trunk/; revision=5460
This commit is contained in:
parent
a5aebabd2d
commit
ab1a2d5d65
@ -1,3 +1,7 @@
|
||||
2007-04-25 Paolo Borellki <pborelli@katamail.com>
|
||||
|
||||
* glib/gstrfuncs.c (g_strsplit): small cleanup. (#433387)
|
||||
|
||||
2007-04-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/glib.symbols:
|
||||
|
@ -2288,13 +2288,10 @@ g_strsplit (const gchar *string,
|
||||
while (--max_tokens && s)
|
||||
{
|
||||
gsize len;
|
||||
gchar *new_string;
|
||||
|
||||
len = s - remainder;
|
||||
new_string = g_new (gchar, len + 1);
|
||||
strncpy (new_string, remainder, len);
|
||||
new_string[len] = 0;
|
||||
string_list = g_slist_prepend (string_list, new_string);
|
||||
string_list = g_slist_prepend (string_list,
|
||||
g_strndup (remainder, len));
|
||||
n++;
|
||||
remainder = s + delimiter_len;
|
||||
s = strstr (remainder, delimiter);
|
||||
|
Loading…
Reference in New Issue
Block a user