diff --git a/glib/gerror.c b/glib/gerror.c index 2adbdf84d..809d0c940 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -587,16 +587,13 @@ g_set_error_literal (GError **err, gint code, const gchar *message) { - GError *new; - if (err == NULL) return; - new = g_error_new_literal (domain, code, message); if (*err == NULL) - *err = new; + *err = g_error_new_literal (domain, code, message); else - g_warning (ERROR_OVERWRITTEN_WARNING, new->message); + g_warning (ERROR_OVERWRITTEN_WARNING, message); } /**