[calls] Various codestyle fixes



commit 2af2b316ecb959de78e9d447c6138a82bd15694a
Author: Evangelos Ribeiro Tzaras <evangelos tzaras puri sm>
Date:   Sun Jul 4 00:22:56 2021 +0200

    Various codestyle fixes

 plugins/sip/calls-sip-provider.c |  2 +-
 plugins/sip/calls-sip-util.c     |  8 ++++----
 plugins/sip/calls-sip-util.h     | 10 +++++-----
 src/calls-origin.c               |  6 ++----
 4 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/plugins/sip/calls-sip-provider.c b/plugins/sip/calls-sip-provider.c
index 096c1643..841f3d08 100644
--- a/plugins/sip/calls-sip-provider.c
+++ b/plugins/sip/calls-sip-provider.c
@@ -85,7 +85,7 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED
  G_IMPLEMENT_INTERFACE_DYNAMIC (CALLS_TYPE_MESSAGE_SOURCE,
                                 calls_sip_provider_message_source_interface_init)
  G_IMPLEMENT_INTERFACE_DYNAMIC (CALLS_TYPE_ACCOUNT_PROVIDER,
-                                calls_sip_provider_account_provider_interface_init));
+                                calls_sip_provider_account_provider_interface_init))
 
 
 static void
diff --git a/plugins/sip/calls-sip-util.c b/plugins/sip/calls-sip-util.c
index 355633e4..d5ea2a39 100644
--- a/plugins/sip/calls-sip-util.c
+++ b/plugins/sip/calls-sip-util.c
@@ -25,7 +25,7 @@
 #include "calls-sip-util.h"
 
 gboolean
-check_ipv6 (const gchar *host)
+check_ipv6 (const char *host)
 {
   /* TODO DNS SRV records to determine whether or not to use IPv6 */
   return FALSE;
@@ -33,7 +33,7 @@ check_ipv6 (const gchar *host)
 
 
 gboolean
-check_sips (const gchar *addr)
+check_sips (const char *addr)
 {
   /* To keep it simple we only check if the URL starts with "sips:" */
   return g_str_has_prefix (addr, "sips:");
@@ -41,7 +41,7 @@ check_sips (const gchar *addr)
 
 
 const gchar *
-get_protocol_prefix (const gchar *protocol)
+get_protocol_prefix (const char *protocol)
 {
   if (g_strcmp0 (protocol, "UDP") == 0 ||
       g_strcmp0 (protocol, "TCP") == 0)
@@ -55,7 +55,7 @@ get_protocol_prefix (const gchar *protocol)
 
 
 gboolean
-protocol_is_valid (const gchar *protocol)
+protocol_is_valid (const char *protocol)
 {
   return g_strcmp0 (protocol, "UDP") == 0 ||
     g_strcmp0 (protocol, "TCP") == 0 ||
diff --git a/plugins/sip/calls-sip-util.h b/plugins/sip/calls-sip-util.h
index 61cfe0ff..a0ebb02a 100644
--- a/plugins/sip/calls-sip-util.h
+++ b/plugins/sip/calls-sip-util.h
@@ -58,8 +58,8 @@ typedef enum
   } SipEngineState;
 
 
-gboolean check_sips (const gchar *addr);
-gboolean check_ipv6 (const gchar *host);
-const gchar *get_protocol_prefix (const gchar *protocol);
-gboolean protocol_is_valid (const gchar *protocol);
-guint get_port_for_rtp (void);
+gboolean              check_sips                         (const char *addr);
+gboolean              check_ipv6                         (const char *host);
+const char           *get_protocol_prefix                (const char *protocol);
+gboolean              protocol_is_valid                  (const char *protocol);
+guint                 get_port_for_rtp                   (void);
diff --git a/src/calls-origin.c b/src/calls-origin.c
index 8ec61128..82bbdc64 100644
--- a/src/calls-origin.c
+++ b/src/calls-origin.c
@@ -33,7 +33,7 @@
  */
 
 
-G_DEFINE_INTERFACE (CallsOrigin, calls_origin, CALLS_TYPE_MESSAGE_SOURCE);
+G_DEFINE_INTERFACE (CallsOrigin, calls_origin, CALLS_TYPE_MESSAGE_SOURCE)
 
 enum {
   SIGNAL_CALL_ADDED,
@@ -133,9 +133,7 @@ calls_origin_foreach_call(CallsOrigin *self,
   calls = calls_origin_get_calls (self);
 
   for (node = calls; node; node = node->next)
-    {
-      callback (param, CALLS_CALL (node->data), self);
-    }
+    callback (param, CALLS_CALL (node->data), self);
 }
 
 


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