gdbus: Use g_dbus_create_error_valist internally
There is no need to duplicate code in g_dbus_send_error_valist.
diff --git a/gdbus/object.c b/gdbus/object.c
index b62c062..0f42dad 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1530,11 +1530,8 @@
const char *format, va_list args)
{
DBusMessage *error;
- char str[1024];
- vsnprintf(str, sizeof(str), format, args);
-
- error = dbus_message_new_error(message, name, str);
+ error = g_dbus_create_error_valist(message, name, format, args);
if (error == NULL)
return FALSE;