[CodeClean] remove unnecessary code
authorJaeyun Jung <jy1210.jung@samsung.com>
Tue, 2 May 2023 07:51:28 +0000 (16:51 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 2 May 2023 08:41:42 +0000 (17:41 +0900)
Code clean, fix indent and remove unnecessary lines.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
src/libnnstreamer-edge/nnstreamer-edge-internal.c
src/libnnstreamer-edge/nnstreamer-edge-mqtt.h
tests/unittest_nnstreamer-edge.cc

index d38932542662c18d6057d4dd2caa68b2a4e783a3..3857249e5c7bf6aca224825e113f8e058fdc922c 100644 (file)
 #include "nnstreamer-edge-aitt.h"
 #include "nnstreamer-edge-mqtt.h"
 
-#ifndef PTHREAD_CREATE_JOINABLE
-#define PTHREAD_CREATE_JOINABLE 0
-#endif
-
 #ifndef MSG_NOSIGNAL
 #define MSG_NOSIGNAL 0
 #endif
 
+/**
+ * @brief The maximum length of pending connections to accept socket.
+ */
 #define N_BACKLOG 10
-#define DEFAULT_TIMEOUT_SEC 10
 
 /**
  * @brief Data structure for edge handle.
@@ -169,11 +167,7 @@ _set_socket_option (int fd)
 static bool
 _fill_socket_addr (struct sockaddr_in *saddr, const char *host, const int port)
 {
-  /**
-   * @todo handle protocol
-   * 1. support edge connection type (TCP/UDP)
-   * 2. ipv4 and ipv6
-   */
+  /** @todo handle protocol (ipv4 and ipv6) */
   saddr->sin_family = AF_INET;
   saddr->sin_port = htons (port);
 
index df0a662218241956c630bad05b01e089e5b7d745..7ef2532d9e325634ac77e06f7fff91e2637e4722 100644 (file)
@@ -55,8 +55,7 @@ bool nns_edge_mqtt_is_connected (nns_edge_broker_h broker_h);
 /**
  * @brief Get message from mqtt broker with within timeout. (0 for inifinite timeout)
  */
-int
-nns_edge_mqtt_get_message (nns_edge_broker_h broker_h, void **msg, nns_size_t * msg_len,  unsigned int timeout);
+int nns_edge_mqtt_get_message (nns_edge_broker_h broker_h, void **msg, nns_size_t *msg_len, unsigned int timeout);
 
 /**
  * @brief Internal util function to send edge-data via MQTT connection.
index df6b80945d4260f9b097ac16da375bb55b421980..f644691b65838c82e4ddc73cb4ed21ac102b6bee 100644 (file)
@@ -2092,7 +2092,7 @@ TEST(edgeDataSerialize, normal)
   ret = nns_edge_data_destroy (dest_h);
   EXPECT_EQ (ret, NNS_EDGE_ERROR_NONE);
 
-  SAFE_FREE(serialized_data);
+  SAFE_FREE (serialized_data);
 }
 
 
@@ -3583,7 +3583,7 @@ TEST(edgeQueue, pushInvalidParam03_n)
 
   EXPECT_TRUE (nns_edge_queue_destroy (queue_h));
 
-  SAFE_FREE(data);
+  SAFE_FREE (data);
 }
 
 /**