mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-05 16:14:49 +01:00
Optimize the common cases (init == NULL or init == "") a bit. replace uses
2003-03-30 Matthias Clasen <maclas@gmx.de> * glib/gstring.c (g_string_new): Optimize the common cases (init == NULL or init == "") a bit. * glib/gmarkup.c, glib/gmessages.c, glib/gscanner.c, glib/gshell.c, glib/gspawn-win32-helper.c, glib/gspawn-win32.c, glib/gspawn.c, gobject/gvaluetransform.c: replace uses of g_string_new ("") by g_string_new (NULL). (#106973, Morten Welinder)
This commit is contained in:
committed by
Matthias Clasen
parent
cb0e4de11c
commit
6710fd6e06
@@ -37,7 +37,7 @@ write_err_and_exit (gint fd,
|
||||
|
||||
if (debug)
|
||||
{
|
||||
debugstring = g_string_new ("");
|
||||
debugstring = g_string_new (NULL);
|
||||
g_string_append (debugstring,
|
||||
g_strdup_printf ("writing error code %d and errno %d",
|
||||
msg, en));
|
||||
@@ -82,7 +82,7 @@ WinMain (struct HINSTANCE__ *hInstance,
|
||||
|
||||
if (debug)
|
||||
{
|
||||
debugstring = g_string_new ("");
|
||||
debugstring = g_string_new (NULL);
|
||||
|
||||
g_string_append (debugstring,
|
||||
g_strdup_printf ("g-spawn-win32-helper: "
|
||||
@@ -212,7 +212,7 @@ WinMain (struct HINSTANCE__ *hInstance,
|
||||
|
||||
if (debug)
|
||||
{
|
||||
debugstring = g_string_new ("");
|
||||
debugstring = g_string_new (NULL);
|
||||
g_string_append (debugstring,
|
||||
g_strdup_printf ("calling %s %s mode=%s argv: ",
|
||||
(__argv[ARG_USE_PATH][0] == 'y' ?
|
||||
@@ -237,7 +237,7 @@ WinMain (struct HINSTANCE__ *hInstance,
|
||||
|
||||
if (debug)
|
||||
{
|
||||
debugstring = g_string_new ("");
|
||||
debugstring = g_string_new (NULL);
|
||||
g_string_append (debugstring,
|
||||
g_strdup_printf ("%s returned %#x",
|
||||
(__argv[ARG_USE_PATH][0] == 'y' ?
|
||||
|
||||
Reference in New Issue
Block a user