From 54b43229f4d6c3bf456f7b910bc00722a4f956d8 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 20 Apr 2009 13:46:09 +0200 Subject: [PATCH] Use g_error_new_valist instead of a private copy of it --- gio/gsimpleasyncresult.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c index 6b73358..e071d96 100644 --- a/gio/gsimpleasyncresult.c +++ b/gio/gsimpleasyncresult.c @@ -487,23 +487,6 @@ g_simple_async_result_set_from_error (GSimpleAsyncResult *simple, simple->failed = TRUE; } -static GError* -_g_error_new_valist (GQuark domain, - gint code, - const char *format, - va_list args) -{ - GError *error; - char *message; - - message = g_strdup_vprintf (format, args); - - error = g_error_new_literal (domain, code, message); - g_free (message); - - return error; -} - /** * g_simple_async_result_set_error_va: * @simple: a #GSimpleAsyncResult. @@ -528,7 +511,7 @@ g_simple_async_result_set_error_va (GSimpleAsyncResult *simple, if (simple->error) g_error_free (simple->error); - simple->error = _g_error_new_valist (domain, code, format, args); + simple->error = g_error_new_valist (domain, code, format, args); simple->failed = TRUE; } -- 2.7.4