[jsonrpc-glib] client: use g_error_new_literal()



commit db09810a56ba8fe139a2a09c0c4a5d4c7f96606d
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 19 13:44:14 2018 -0800

    client: use g_error_new_literal()
    
    We don't need any string formatting here.

 src/jsonrpc-client.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/jsonrpc-client.c b/src/jsonrpc-client.c
index 7ce6408..5da8d99 100644
--- a/src/jsonrpc-client.c
+++ b/src/jsonrpc-client.c
@@ -751,9 +751,9 @@ jsonrpc_client_call_read_cb (GObject      *object,
       if (!g_variant_dict_lookup (&dict, "method", "&s", &method_name) ||
           NULL == (id = g_variant_dict_lookup_value (&dict, "id", NULL)))
         {
-          error = g_error_new (G_IO_ERROR,
-                               G_IO_ERROR_INVALID_DATA,
-                               "Call contains invalid method or id field");
+          error = g_error_new_literal (G_IO_ERROR,
+                                       G_IO_ERROR_INVALID_DATA,
+                                       "Call contains invalid method or id field");
           jsonrpc_client_panic (self, error);
           return;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]