From: Christian Persch Date: Mon, 20 Apr 2009 11:46:09 +0000 (+0200) Subject: Use g_error_new_valist instead of a private copy of it X-Git-Tag: 2.21.1~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54b43229f4d6c3bf456f7b910bc00722a4f956d8;p=platform%2Fupstream%2Fglib.git Use g_error_new_valist instead of a private copy of it --- 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; }