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) {
// 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;
......
......@@ -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 <stdint.h>
......@@ -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_
......@@ -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 <stdint.h>
......@@ -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_
......@@ -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);
}
......@@ -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 <stdint.h>
#include <embb_mtapi_network_buffer.h>
......
......@@ -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() {
......
......@@ -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 <partest/partest.h>
......@@ -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_
......@@ -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);
......
......@@ -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 <partest/partest.h>
......@@ -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_
......@@ -31,8 +31,7 @@
#include <embb/base/c/internal/unused.h>
#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
......
......@@ -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 <partest/partest.h>
......@@ -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_
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