summaryrefslogtreecommitdiff
path: root/gstrfuncs.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-02-10 08:06:26 +0000
committerTim Janik <timj@src.gnome.org>1999-02-10 08:06:26 +0000
commita8ff1b4fcef1e2c53603b30b918304f7be9f27b4 (patch)
treede53f40d1b3978c7bc1dbdf0e0a6c60ac0f20dcb /gstrfuncs.c
parent6c7994772297281730071874e609b62e68c211be (diff)
fixed errernerous code wrt to thread specific error string allocation
Wed Feb 10 07:56:33 1999 Tim Janik <timj@gtk.org> * gmodule.c (g_module_error): fixed errernerous code wrt to thread specific error string allocation handling. Wed Feb 10 06:20:30 1999 Tim Janik <timj@gtk.org> * gmutex.c (g_static_private_set): invoke destroy notifier when overwriting values, initialize new array fields with NULL. (g_static_private_free_data): do not skip destroy notification for data == NULL. * gutils.c (g_direct_equal): compare pointer values directly instead of just their guint values which is a loosing conversion for sizeof(gpointer)==8 systems. (g_get_any_init): restructured code so we don't use endless loops like while (1), which boil down to an ugly alias for goto. strip ,.* from the real name.
Diffstat (limited to 'gstrfuncs.c')
-rw-r--r--gstrfuncs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gstrfuncs.c b/gstrfuncs.c
index 0a1648515..32fdeb52f 100644
--- a/gstrfuncs.c
+++ b/gstrfuncs.c
@@ -644,13 +644,14 @@ g_strerror (gint errnum)
#endif /* NO_SYS_ERRLIST */
msg = g_static_private_get (&msg_private);
- if( !msg )
+ if (!msg)
{
- msg = g_new( gchar, 64 );
+ msg = g_new (gchar, 64);
g_static_private_set (&msg_private, msg, g_free);
}
sprintf (msg, "unknown error (%d)", errnum);
+
return msg;
}
@@ -770,13 +771,14 @@ g_strsignal (gint signum)
#endif /* NO_SYS_SIGLIST */
msg = g_static_private_get (&msg_private);
- if( !msg )
+ if (!msg)
{
- msg = g_new( gchar, 64 );
+ msg = g_new (gchar, 64);
g_static_private_set (&msg_private, msg, g_free);
}
sprintf (msg, "unknown signal (%d)", signum);
+
return msg;
}