From 9d9184e64e75bfbe92fd70a602779d7212da57d9 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Fri, 19 Dec 2014 14:37:58 +0100 Subject: [PATCH] mtapi_network_c: fixed cpplint warnings --- mtapi_network_c/src/embb_mtapi_network.c | 9 +++++---- mtapi_network_c/src/embb_mtapi_network.h | 6 +++--- mtapi_network_c/src/embb_mtapi_network_buffer.h | 6 +++--- mtapi_network_c/src/embb_mtapi_network_socket.c | 3 ++- mtapi_network_c/src/embb_mtapi_network_socket.h | 4 ++-- mtapi_network_c/test/embb_mtapi_network_test_buffer.cc | 3 ++- mtapi_network_c/test/embb_mtapi_network_test_buffer.h | 6 +++--- mtapi_network_c/test/embb_mtapi_network_test_socket.cc | 6 ++++-- mtapi_network_c/test/embb_mtapi_network_test_socket.h | 6 +++--- mtapi_network_c/test/embb_mtapi_network_test_task.cc | 3 +-- mtapi_network_c/test/embb_mtapi_network_test_task.h | 6 +++--- 11 files changed, 31 insertions(+), 27 deletions(-) diff --git a/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_network_c/src/embb_mtapi_network.c index ba533c0..1a3b146 100644 --- a/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_network_c/src/embb_mtapi_network.c @@ -269,8 +269,7 @@ static int embb_mtapi_network_thread(void * args) { // socket, &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_id; int task_tag; @@ -357,7 +356,8 @@ void mtapi_network_plugin_initialize( &plugin->sockets[0], host, port, max_connections); 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) { local_status = MTAPI_SUCCESS; } @@ -503,7 +503,8 @@ mtapi_action_hndl_t mtapi_network_action_create( action->domain_id = domain_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); action->host = host; diff --git a/mtapi_network_c/src/embb_mtapi_network.h b/mtapi_network_c/src/embb_mtapi_network.h index 43b0920..cc524f8 100644 --- a/mtapi_network_c/src/embb_mtapi_network.h +++ b/mtapi_network_c/src/embb_mtapi_network.h @@ -24,8 +24,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_ -#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_ +#ifndef MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_H_ +#define MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_H_ #include @@ -43,4 +43,4 @@ void embb_mtapi_network_finalize(); } #endif -#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_H_ +#endif // MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_H_ diff --git a/mtapi_network_c/src/embb_mtapi_network_buffer.h b/mtapi_network_c/src/embb_mtapi_network_buffer.h index 0415680..64d6c13 100644 --- a/mtapi_network_c/src/embb_mtapi_network_buffer.h +++ b/mtapi_network_c/src/embb_mtapi_network_buffer.h @@ -24,8 +24,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ -#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ +#ifndef MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ +#define MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ #include @@ -103,4 +103,4 @@ int embb_mtapi_network_buffer_pop_front_rawdata( } #endif -#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ +#endif // MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_BUFFER_H_ diff --git a/mtapi_network_c/src/embb_mtapi_network_socket.c b/mtapi_network_c/src/embb_mtapi_network_socket.c index c148b9d..2c7da13 100644 --- a/mtapi_network_c/src/embb_mtapi_network_socket.c +++ b/mtapi_network_c/src/embb_mtapi_network_socket.c @@ -216,5 +216,6 @@ int embb_mtapi_network_socket_recvbuffer_sized( int embb_mtapi_network_socket_recvbuffer( embb_mtapi_network_socket_t * that, 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); } diff --git a/mtapi_network_c/src/embb_mtapi_network_socket.h b/mtapi_network_c/src/embb_mtapi_network_socket.h index 4d6ec5f..9beac5e 100644 --- a/mtapi_network_c/src/embb_mtapi_network_socket.h +++ b/mtapi_network_c/src/embb_mtapi_network_socket.h @@ -24,8 +24,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_ -#define MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_ +#ifndef MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_ +#define MTAPI_NETWORK_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_ #include #include diff --git a/mtapi_network_c/test/embb_mtapi_network_test_buffer.cc b/mtapi_network_c/test/embb_mtapi_network_test_buffer.cc index 69b39b8..bee2217 100644 --- a/mtapi_network_c/test/embb_mtapi_network_test_buffer.cc +++ b/mtapi_network_c/test/embb_mtapi_network_test_buffer.cc @@ -32,7 +32,8 @@ NetworkBufferTest::NetworkBufferTest() { - CreateUnit("mtapi network buffer test").Add(&NetworkBufferTest::TestBasic, this); + CreateUnit("mtapi network buffer test").Add( + &NetworkBufferTest::TestBasic, this); } void NetworkBufferTest::TestBasic() { diff --git a/mtapi_network_c/test/embb_mtapi_network_test_buffer.h b/mtapi_network_c/test/embb_mtapi_network_test_buffer.h index 88fd44a..abd34bd 100644 --- a/mtapi_network_c/test/embb_mtapi_network_test_buffer.h +++ b/mtapi_network_c/test/embb_mtapi_network_test_buffer.h @@ -24,8 +24,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ -#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ +#ifndef MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ +#define MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ #include @@ -37,4 +37,4 @@ class NetworkBufferTest : public partest::TestCase { void TestBasic(); }; -#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ +#endif // MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_BUFFER_H_ diff --git a/mtapi_network_c/test/embb_mtapi_network_test_socket.cc b/mtapi_network_c/test/embb_mtapi_network_test_socket.cc index b4cf8e6..8d89104 100644 --- a/mtapi_network_c/test/embb_mtapi_network_test_socket.cc +++ b/mtapi_network_c/test/embb_mtapi_network_test_socket.cc @@ -33,7 +33,8 @@ NetworkSocketTest::NetworkSocketTest() { - CreateUnit("mtapi network socket test").Add(&NetworkSocketTest::TestBasic, this); + CreateUnit("mtapi network socket test").Add( + &NetworkSocketTest::TestBasic, this); } void NetworkSocketTest::TestBasic() { @@ -52,7 +53,8 @@ void NetworkSocketTest::TestBasic() { err = embb_mtapi_network_socket_initialize(&server_sock); 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); err = embb_mtapi_network_socket_select(&server_sock, 1, 1); diff --git a/mtapi_network_c/test/embb_mtapi_network_test_socket.h b/mtapi_network_c/test/embb_mtapi_network_test_socket.h index 16dc22e..b9b9f6c 100644 --- a/mtapi_network_c/test/embb_mtapi_network_test_socket.h +++ b/mtapi_network_c/test/embb_mtapi_network_test_socket.h @@ -24,8 +24,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ -#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ +#ifndef MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ +#define MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ #include @@ -37,4 +37,4 @@ class NetworkSocketTest : public partest::TestCase { void TestBasic(); }; -#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ +#endif // MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_SOCKET_H_ diff --git a/mtapi_network_c/test/embb_mtapi_network_test_task.cc b/mtapi_network_c/test/embb_mtapi_network_test_task.cc index 3809f81..e52c9b5 100644 --- a/mtapi_network_c/test/embb_mtapi_network_test_task.cc +++ b/mtapi_network_c/test/embb_mtapi_network_test_task.cc @@ -31,8 +31,7 @@ #include -#define MTAPI_CHECK_STATUS(status) \ -PT_ASSERT(MTAPI_SUCCESS == status) +#define MTAPI_CHECK_STATUS(status) PT_ASSERT(MTAPI_SUCCESS == status) #define NETWORK_DOMAIN 1 #define NETWORK_LOCAL_NODE 3 diff --git a/mtapi_network_c/test/embb_mtapi_network_test_task.h b/mtapi_network_c/test/embb_mtapi_network_test_task.h index 864a319..9764e7d 100644 --- a/mtapi_network_c/test/embb_mtapi_network_test_task.h +++ b/mtapi_network_c/test/embb_mtapi_network_test_task.h @@ -24,8 +24,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ -#define MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ +#ifndef MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ +#define MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ #include @@ -37,4 +37,4 @@ class NetworkTaskTest : public partest::TestCase { void TestBasic(); }; -#endif // MTAPI_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ +#endif // MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ -- libgit2 0.26.0