diff options
author | 2016-10-19 18:54:18 -0400 | |
---|---|---|
committer | 2016-10-21 10:42:35 +0200 | |
commit | 663163e519820b1a4ece0368d9932186cd803f5a (patch) | |
tree | 62a60486a66bc159a8a175c8917c2fb0644c38a9 /lib/libtle_udp | |
parent | 7a7ef4def34d6a2c9b21a9b4135cedd14fb9f72d (diff) |
tldk: fix for positive errno return values in udp_ctl.c
'Public' functions should return negative values.
Change-Id: I88eaf76f882eee08a4198543d0c8531656530360
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Diffstat (limited to 'lib/libtle_udp')
-rw-r--r-- | lib/libtle_udp/tle_udp_impl.h | 2 | ||||
-rw-r--r-- | lib/libtle_udp/udp_ctl.c | 4 |
2 files changed, 3 insertions, 3 deletions
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) { |