static gboolean _mc_service_is_valid_queue(mc_service_t *data)
{
- if ((data == NULL) || (data->request) == NULL || (data->request->queue == NULL))
- return FALSE;
- return TRUE;
+ return (data && data->request && data->request->queue);
}
static gboolean _mc_service_is_exist_pid(GList *list, int pid, mc_priv_type_e priv_type)
{
- int res = __mc_list_get_index(list, pid, priv_type);
-
- return (res == -1) ? FALSE : TRUE;
+ return (__mc_list_get_index(list, pid, priv_type) != -1);
}
static gboolean _mc_service_is_valid_connection(GList *connected_list, mc_comm_msg_s *request_msg)