[libgovirt] ovirt-resource: Only cast to REST_PROXY_CALL once



commit b2581a654137e9be9c4adcb80f54ae834934f300
Author: Eduardo Lima (Etrunko) <etrunko redhat com>
Date:   Fri Aug 30 17:44:52 2019 -0300

    ovirt-resource: Only cast to REST_PROXY_CALL once
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko redhat com>

 govirt/ovirt-resource.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/govirt/ovirt-resource.c b/govirt/ovirt-resource.c
index 6db72f8..0442724 100644
--- a/govirt/ovirt-resource.c
+++ b/govirt/ovirt-resource.c
@@ -616,19 +616,18 @@ ovirt_resource_create_rest_call_for_action(OvirtResource *resource,
                                            OvirtProxy *proxy,
                                            const char *action)
 {
-    OvirtActionRestCall *call;
+    RestProxyCall *call;
     const char *function;
 
     function = ovirt_resource_get_action(resource, action);
     g_return_val_if_fail(function != NULL, NULL);
 
-    call = ovirt_action_rest_call_new(REST_PROXY(proxy));
-    rest_proxy_call_set_method(REST_PROXY_CALL(call), "POST");
-    rest_proxy_call_set_function(REST_PROXY_CALL(call), function);
-    rest_proxy_call_add_param(REST_PROXY_CALL(call),
-                              "async", "false");
+    call = REST_PROXY_CALL(ovirt_action_rest_call_new(REST_PROXY(proxy)));
+    rest_proxy_call_set_method(call, "POST");
+    rest_proxy_call_set_function(call, function);
+    rest_proxy_call_add_param(call, "async", "false");
 
-    return REST_PROXY_CALL(call);
+    return call;
 }
 
 gboolean


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