Skip to content

Commit

Permalink
[CodeClean] remove unnecessary code
Browse files Browse the repository at this point in the history
Code clean, fix indent and remove unnecessary lines.

Signed-off-by: Jaeyun Jung <[email protected]>
  • Loading branch information
jaeyun-jung committed May 2, 2023
1 parent e110ce9 commit 4bedb21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
14 changes: 4 additions & 10 deletions src/libnnstreamer-edge/nnstreamer-edge-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@
#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.
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 1 addition & 2 deletions src/libnnstreamer-edge/nnstreamer-edge-mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/unittest_nnstreamer-edge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down Expand Up @@ -3583,7 +3583,7 @@ TEST(edgeQueue, pushInvalidParam03_n)

EXPECT_TRUE (nns_edge_queue_destroy (queue_h));

SAFE_FREE(data);
SAFE_FREE (data);
}

/**
Expand Down

0 comments on commit 4bedb21

Please sign in to comment.