Fix coverity issue
[platform/core/telephony/telephony-daemon.git] / src / monitor.c
index b65defd..fb090d7 100644 (file)
@@ -44,7 +44,7 @@ static void _hash_dump(gpointer key, gpointer value, gpointer user_data)
 {
        NOTUSED(user_data);
 
-       msg("         - %s: [%s]", key, value);
+       msg("         - %s: [%s]", (char *)key, (char *)value);
 }
 
 static void _monitor_core_objects(GSList *list)
@@ -57,7 +57,7 @@ static void _monitor_core_objects(GSList *list)
 
                msg("     Name: [%s]", tcore_object_ref_name(co));
                msg("       - addr: %p", co);
-               msg("       - type: %p", tcore_object_get_type(co));
+               msg("       - type: %d", tcore_object_get_type(co));
                msg("       - hal: %p", tcore_object_get_hal(co));
 
                prop = tcore_object_ref_property_hash(co);
@@ -67,7 +67,7 @@ static void _monitor_core_objects(GSList *list)
                }
 
                list = list->next;
-       } while(list);
+       } while (list);
 }
 
 static void _monitor_plugin(Server *s)
@@ -108,7 +108,7 @@ static void _monitor_plugin(Server *s)
                msg("");
 
                list = list->next;
-       } while(list);
+       } while (list);
 }
 
 static void _monitor_storage(Server *s)
@@ -130,7 +130,7 @@ static void _monitor_storage(Server *s)
                msg("");
 
                list = list->next;
-       } while(list);
+       } while (list);
 }
 
 static void _monitor_communicator(Server *s)
@@ -154,7 +154,7 @@ static void _monitor_communicator(Server *s)
                msg("");
 
                list = list->next;
-       } while(list);
+       } while (list);
 }
 
 static void _monitor_hal(Server *s)
@@ -208,9 +208,9 @@ static void _monitor_hal(Server *s)
                        pending = g_queue_peek_nth(q->gq, i);
                        ur = tcore_pending_ref_user_request(pending);
                        msg("   [%02d] pending=%p, id=0x%x, ur=%p", i, pending, tcore_pending_get_id(pending), ur);
-                       if (ur) {
+                       if (ur)
                                msg("        ur request command = 0x%x", tcore_user_request_get_command(ur));
-                       }
+
                        data_len = 0;
                        data = tcore_pending_ref_request_data(pending, &data_len);
                        msg("        data=%p, data_len=%d", data, data_len);
@@ -219,7 +219,7 @@ static void _monitor_hal(Server *s)
                msg("");
 
                list = list->next;
-       } while(list);
+       } while (list);
 }
 
 void monitor_server_state(Server *s)