mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-09 22:30:06 +02: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>
|
2007-04-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/glib.symbols:
|
* glib/glib.symbols:
|
||||||
|
@ -2288,13 +2288,10 @@ g_strsplit (const gchar *string,
|
|||||||
while (--max_tokens && s)
|
while (--max_tokens && s)
|
||||||
{
|
{
|
||||||
gsize len;
|
gsize len;
|
||||||
gchar *new_string;
|
|
||||||
|
|
||||||
len = s - remainder;
|
len = s - remainder;
|
||||||
new_string = g_new (gchar, len + 1);
|
string_list = g_slist_prepend (string_list,
|
||||||
strncpy (new_string, remainder, len);
|
g_strndup (remainder, len));
|
||||||
new_string[len] = 0;
|
|
||||||
string_list = g_slist_prepend (string_list, new_string);
|
|
||||||
n++;
|
n++;
|
||||||
remainder = s + delimiter_len;
|
remainder = s + delimiter_len;
|
||||||
s = strstr (remainder, delimiter);
|
s = strstr (remainder, delimiter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user