diff options
-rw-r--r-- | lib/libtle_udp/event.c | 2 | ||||
-rw-r--r-- | lib/libtle_udp/tle_udp_impl.h | 2 | ||||
-rw-r--r-- | lib/libtle_udp/udp_ctl.c | 4 | ||||
-rw-r--r-- | test/gtest/test_tle_udp_event.cpp | 2 | ||||
-rw-r--r-- | test/gtest/test_tle_udp_stream.cpp | 10 |
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/libtle_udp/event.c b/lib/libtle_udp/event.c index 7e340e8..66c5a3b 100644 --- a/lib/libtle_udp/event.c +++ b/lib/libtle_udp/event.c @@ -79,7 +79,7 @@ tle_event_alloc(struct tle_evq *evq, const void *data) evq->nb_free--; h->data = data; } else - rte_errno = -ENOMEM; + rte_errno = ENOMEM; rte_spinlock_unlock(&evq->lock); return h; } diff --git a/lib/libtle_udp/tle_udp_impl.h b/lib/libtle_udp/tle_udp_impl.h index a0af7ce..c55d605 100644 --- a/lib/libtle_udp/tle_udp_impl.h +++ b/lib/libtle_udp/tle_udp_impl.h @@ -270,7 +270,7 @@ int tle_udp_stream_close(struct tle_udp_stream *s); * Pointer to the stream. * @return * zero on successful completion. - * - EINVAL - invalid parameter passed to function + * - -EINVAL - invalid parameter passed to function */ int tle_udp_stream_get_param(const struct tle_udp_stream *s, diff --git a/lib/libtle_udp/udp_ctl.c b/lib/libtle_udp/udp_ctl.c index e6da8f2..faedcad 100644 --- a/lib/libtle_udp/udp_ctl.c +++ b/lib/libtle_udp/udp_ctl.c @@ -730,7 +730,7 @@ tle_udp_stream_close(struct tle_udp_stream *s) static const struct tle_udp_stream_cb zcb; if (s == NULL || s->type >= TLE_UDP_VNUM) - return EINVAL; + return -EINVAL; ctx = s->ctx; @@ -779,7 +779,7 @@ tle_udp_stream_get_param(const struct tle_udp_stream *s, struct sockaddr_in6 *lin6; if (prm == NULL || s == NULL || s->type >= TLE_UDP_VNUM) - return EINVAL; + return -EINVAL; prm[0] = s->prm; if (prm->local_addr.ss_family == AF_INET) { diff --git a/test/gtest/test_tle_udp_event.cpp b/test/gtest/test_tle_udp_event.cpp index 6d5c548..c7c25a0 100644 --- a/test/gtest/test_tle_udp_event.cpp +++ b/test/gtest/test_tle_udp_event.cpp @@ -78,7 +78,7 @@ TEST_F(udp_event, udp_event_alloc_free_max_reached) last_event = tle_event_alloc(evq, (void *) &fake_data); ASSERT_EQ(last_event, (struct tle_event *) NULL); - ASSERT_EQ(rte_errno, -ENOMEM); + ASSERT_EQ(rte_errno, ENOMEM); for (i = 1; i <= max_events; i++) { tle_event_free(event); diff --git a/test/gtest/test_tle_udp_stream.cpp b/test/gtest/test_tle_udp_stream.cpp index 9356288..22a1b44 100644 --- a/test/gtest/test_tle_udp_stream.cpp +++ b/test/gtest/test_tle_udp_stream.cpp @@ -33,7 +33,7 @@ TEST_F(test_tle_udp_stream, stream_test_open_nullctx) EXPECT_EQ(rte_errno, EINVAL); ret = tle_udp_stream_close(stream); - EXPECT_EQ(ret, EINVAL); + EXPECT_EQ(ret, -EINVAL); } TEST_F(test_tle_udp_stream, stream_test_open_null_stream_prm) @@ -43,7 +43,7 @@ TEST_F(test_tle_udp_stream, stream_test_open_null_stream_prm) EXPECT_EQ(rte_errno, EINVAL); ret = tle_udp_stream_close(stream); - EXPECT_EQ(ret, EINVAL); + EXPECT_EQ(ret, -EINVAL); } @@ -77,7 +77,7 @@ TEST_F(test_tle_udp_stream, stream_test_close) TEST_F(test_tle_udp_stream, stream_test_close_null) { ret = tle_udp_stream_close(nullptr); - EXPECT_EQ(ret, EINVAL); + EXPECT_EQ(ret, -EINVAL); } @@ -115,7 +115,7 @@ TEST_F(test_tle_udp_stream, stream_get_param_streamnull) EXPECT_NE(stream, nullptr); ret = tle_udp_stream_get_param(nullptr, &prm); - EXPECT_EQ(ret, EINVAL); + EXPECT_EQ(ret, -EINVAL); } TEST_F(test_tle_udp_stream, stream_get_param_prmnull) @@ -127,7 +127,7 @@ TEST_F(test_tle_udp_stream, stream_get_param_prmnull) EXPECT_NE(stream, nullptr); ret = tle_udp_stream_get_param(stream, nullptr); - EXPECT_EQ(ret, EINVAL); + EXPECT_EQ(ret, -EINVAL); } |