Commit 9d9184e6 by Marcus Winter

mtapi_network_c: fixed cpplint warnings

parent 2f41857b
...@@ -269,8 +269,7 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -269,8 +269,7 @@ static int embb_mtapi_network_thread(void * args) {
// socket, &buffer); // socket, &buffer);
embb_mtapi_network_buffer_clear(&buffer); embb_mtapi_network_buffer_clear(&buffer);
} } else if (operation == EMBB_MTAPI_NETWORK_RETURN_RESULT) {
else if (operation == EMBB_MTAPI_NETWORK_RETURN_RESULT) {
int task_status; int task_status;
int task_id; int task_id;
int task_tag; int task_tag;
...@@ -357,7 +356,8 @@ void mtapi_network_plugin_initialize( ...@@ -357,7 +356,8 @@ void mtapi_network_plugin_initialize(
&plugin->sockets[0], host, port, max_connections); &plugin->sockets[0], host, port, max_connections);
plugin->buffer_size = buffer_size; plugin->buffer_size = buffer_size;
err = embb_thread_create(&plugin->thread, NULL, embb_mtapi_network_thread, NULL); err = embb_thread_create(
&plugin->thread, NULL, embb_mtapi_network_thread, NULL);
if (EMBB_SUCCESS == err) { if (EMBB_SUCCESS == err) {
local_status = MTAPI_SUCCESS; local_status = MTAPI_SUCCESS;
} }
...@@ -503,7 +503,8 @@ mtapi_action_hndl_t mtapi_network_action_create( ...@@ -503,7 +503,8 @@ mtapi_action_hndl_t mtapi_network_action_create(
action->domain_id = domain_id; action->domain_id = domain_id;
action->job_id = remote_job_id; action->job_id = remote_job_id;
embb_mtapi_network_buffer_initialize(&action->send_buffer, plugin->buffer_size); embb_mtapi_network_buffer_initialize(
&action->send_buffer, plugin->buffer_size);
embb_mutex_init(&action->send_mutex, 0); embb_mutex_init(&action->send_mutex, 0);
action->host = host; action->host = host;
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_ #ifndef MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_H_
#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_ #define MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_H_
#include <stdint.h> #include <stdint.h>
...@@ -43,4 +43,4 @@ void embb_mtapi_network_finalize(); ...@@ -43,4 +43,4 @@ void embb_mtapi_network_finalize();
} }
#endif #endif
#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_ #endif // MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_H_
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ #ifndef MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ #define MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
#include <stdint.h> #include <stdint.h>
...@@ -103,4 +103,4 @@ int embb_mtapi_network_buffer_pop_front_rawdata( ...@@ -103,4 +103,4 @@ int embb_mtapi_network_buffer_pop_front_rawdata(
} }
#endif #endif
#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ #endif // MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_
...@@ -216,5 +216,6 @@ int embb_mtapi_network_socket_recvbuffer_sized( ...@@ -216,5 +216,6 @@ int embb_mtapi_network_socket_recvbuffer_sized(
int embb_mtapi_network_socket_recvbuffer( int embb_mtapi_network_socket_recvbuffer(
embb_mtapi_network_socket_t * that, embb_mtapi_network_socket_t * that,
embb_mtapi_network_buffer_t * buffer) { embb_mtapi_network_buffer_t * buffer) {
return embb_mtapi_network_socket_recvbuffer_sized(that, buffer, buffer->capacity); return
embb_mtapi_network_socket_recvbuffer_sized(that, buffer, buffer->capacity);
} }
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_ #ifndef MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_ #define MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#include <stdint.h> #include <stdint.h>
#include <embb_mtapi_network_buffer.h> #include <embb_mtapi_network_buffer.h>
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
NetworkBufferTest::NetworkBufferTest() { NetworkBufferTest::NetworkBufferTest() {
CreateUnit("mtapi network buffer test").Add(&NetworkBufferTest::TestBasic, this); CreateUnit("mtapi network buffer test").Add(
&NetworkBufferTest::TestBasic, this);
} }
void NetworkBufferTest::TestBasic() { void NetworkBufferTest::TestBasic() {
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ #ifndef MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ #define MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
#include <partest/partest.h> #include <partest/partest.h>
...@@ -37,4 +37,4 @@ class NetworkBufferTest : public partest::TestCase { ...@@ -37,4 +37,4 @@ class NetworkBufferTest : public partest::TestCase {
void TestBasic(); void TestBasic();
}; };
#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ #endif // MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
NetworkSocketTest::NetworkSocketTest() { NetworkSocketTest::NetworkSocketTest() {
CreateUnit("mtapi network socket test").Add(&NetworkSocketTest::TestBasic, this); CreateUnit("mtapi network socket test").Add(
&NetworkSocketTest::TestBasic, this);
} }
void NetworkSocketTest::TestBasic() { void NetworkSocketTest::TestBasic() {
...@@ -52,7 +53,8 @@ void NetworkSocketTest::TestBasic() { ...@@ -52,7 +53,8 @@ void NetworkSocketTest::TestBasic() {
err = embb_mtapi_network_socket_initialize(&server_sock); err = embb_mtapi_network_socket_initialize(&server_sock);
PT_EXPECT(err != 0); PT_EXPECT(err != 0);
err = embb_mtapi_network_socket_bind_and_listen(&server_sock, "127.0.0.1", 4711, 5); err = embb_mtapi_network_socket_bind_and_listen(
&server_sock, "127.0.0.1", 4711, 5);
PT_EXPECT(err != 0); PT_EXPECT(err != 0);
err = embb_mtapi_network_socket_select(&server_sock, 1, 1); err = embb_mtapi_network_socket_select(&server_sock, 1, 1);
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ #ifndef MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ #define MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
#include <partest/partest.h> #include <partest/partest.h>
...@@ -37,4 +37,4 @@ class NetworkSocketTest : public partest::TestCase { ...@@ -37,4 +37,4 @@ class NetworkSocketTest : public partest::TestCase {
void TestBasic(); void TestBasic();
}; };
#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ #endif // MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
#include <embb/base/c/internal/unused.h> #include <embb/base/c/internal/unused.h>
#define MTAPI_CHECK_STATUS(status) \ #define MTAPI_CHECK_STATUS(status) PT_ASSERT(MTAPI_SUCCESS == status)
PT_ASSERT(MTAPI_SUCCESS == status)
#define NETWORK_DOMAIN 1 #define NETWORK_DOMAIN 1
#define NETWORK_LOCAL_NODE 3 #define NETWORK_LOCAL_NODE 3
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ #ifndef MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ #define MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
#include <partest/partest.h> #include <partest/partest.h>
...@@ -37,4 +37,4 @@ class NetworkTaskTest : public partest::TestCase { ...@@ -37,4 +37,4 @@ class NetworkTaskTest : public partest::TestCase {
void TestBasic(); void TestBasic();
}; };
#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ #endif // MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment