[CodeClean] fix indent and codestyle
authorJaeyun Jung <jy1210.jung@samsung.com>
Thu, 4 Jan 2024 10:39:46 +0000 (19:39 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 9 Jan 2024 01:35:21 +0000 (10:35 +0900)
Code clean, fix indent and code style.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
c/src/ml-api-service-remote.c
daemon/meson.build
meson.build

index 18d9c70..30e6bda 100644 (file)
@@ -64,7 +64,7 @@ typedef struct
 
   ml_service_event_cb event_cb;
   void *user_data;
-  gchar *path; /** A path to save the received model file */
+  gchar *path; /**< A path to save the received model file */
 } _ml_remote_service_s;
 
 /**
@@ -207,15 +207,9 @@ _mlrs_get_service_type (gchar * service_str)
  * @brief Get ml remote service activation type.
  */
 static gboolean
-_mlrs_parse_activate (gchar * activate)
+_mlrs_parse_activate (const gchar * activate)
 {
-  gboolean ret = TRUE;
-
-  if (g_ascii_strcasecmp (activate, "false") == 0) {
-    ret = FALSE;
-  }
-
-  return ret;
+  return (activate && g_ascii_strcasecmp (activate, "true") == 0);
 }
 
 /**
@@ -559,10 +553,10 @@ ml_service_remote_release_internal (void *priv)
     return ML_ERROR_INVALID_PARAMETER;
 
   nns_edge_release_handle (mlrs->edge_h);
-  g_free (mlrs->path);
 
-  /** Wait some time until release the edge handle. */
+  /* Wait some time until release the edge handle. */
   g_usleep (1000000);
+  g_free (mlrs->path);
   g_free (mlrs);
 
   return ML_ERROR_NONE;
@@ -635,12 +629,12 @@ ml_service_remote_create (ml_option_h option, ml_service_event_cb cb,
 
   _mlrs_release_edge_info (edge_info);
 
-  return ret;
+  return ML_ERROR_NONE;
 }
 
 /**
- *  @brief Register new information, such as neural network models or pipeline descriptions, on a remote server.
-*/
+ * @brief Register new information, such as neural network models or pipeline descriptions, on a remote server.
+ */
 int
 ml_service_remote_register (ml_service_h handle, ml_option_h option, void *data,
     size_t data_len)
index 9e11e25..08e368c 100644 (file)
@@ -84,7 +84,7 @@ ml_agent_static_lib = static_library('ml-agent',
 
 ml_agent_lib = ml_agent_shared_lib
 if get_option('default_library') == 'static'
-    ml_agent_lib = ml_agent_static_lib
+  ml_agent_lib = ml_agent_static_lib
 endif
 
 ml_agent_lib_common_objs = ml_agent_shared_lib.extract_objects(ml_agent_lib_common_srcs)
@@ -102,7 +102,7 @@ ml_agent_test_both_lib = both_libraries('ml-agent-test',
 
 ml_agent_test_lib = ml_agent_test_both_lib.get_shared_lib()
 if get_option('default_library') == 'static'
-    ml_agent_test_lib = ml_agent_test_both_lib.get_static_lib()
+  ml_agent_test_lib = ml_agent_test_both_lib.get_static_lib()
 endif
 
 lib_ml_agent_test_dep = declare_dependency(
index e904d9a..7a0d01e 100644 (file)
@@ -112,7 +112,7 @@ if get_option('enable-tizen')
 endif
 
 if get_option('enable-gcov')
-    add_project_arguments('-DENABLE_GCOV=1', language: ['c', 'cpp'])
+  add_project_arguments('-DENABLE_GCOV=1', language: ['c', 'cpp'])
 endif
 
 serviceDBPath = get_option('service-db-path')