[calls] dummy: origin: Use g_assert in non public functions



commit c2c8b1acd9586e962e51b6b40dc0d1154a3894b6
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Fri Jan 14 06:11:35 2022 +0100

    dummy: origin: Use g_assert in non public functions

 plugins/dummy/calls-dummy-origin.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/plugins/dummy/calls-dummy-origin.c b/plugins/dummy/calls-dummy-origin.c
index b0e1b897..5da0688a 100644
--- a/plugins/dummy/calls-dummy-origin.c
+++ b/plugins/dummy/calls-dummy-origin.c
@@ -111,13 +111,11 @@ call_state_changed_cb (CallsDummyOrigin *self,
                        CallsCallState    old_state,
                        CallsCall        *call)
 {
-  if (new_state != CALLS_CALL_STATE_DISCONNECTED)
-    {
-      return;
-    }
+  g_assert (CALLS_IS_DUMMY_ORIGIN (self));
+  g_assert (CALLS_IS_DUMMY_CALL (call));
 
-  g_return_if_fail (CALLS_IS_DUMMY_ORIGIN (self));
-  g_return_if_fail (CALLS_IS_CALL (call));
+  if (new_state != CALLS_CALL_STATE_DISCONNECTED)
+    return;
 
   remove_call (self, call, "Disconnected");
 }


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