Skip to content

Commit

Permalink
fix: use int8_t return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Nov 14, 2023
1 parent e452b2c commit c79d74d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions include/zenoh-pico/transport/multicast/lease.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "zenoh-pico/transport/transport.h"

int8_t _zp_multicast_send_keep_alive(_z_transport_multicast_t *ztm);
int _zp_multicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int _zp_multicast_stop_lease_task(_z_transport_t *zt);
int8_t _zp_multicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int8_t _zp_multicast_stop_lease_task(_z_transport_t *zt);
void *_zp_multicast_lease_task(void *ztm_arg); // The argument is void* to avoid incompatible pointer types in tasks

#endif /* ZENOH_PICO_MULTICAST_LEASE_H */
4 changes: 2 additions & 2 deletions include/zenoh-pico/transport/multicast/read.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "zenoh-pico/transport/transport.h"

int8_t _zp_multicast_read(_z_transport_multicast_t *ztm);
int _zp_multicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int _zp_multicast_stop_read_task(_z_transport_t *zt);
int8_t _zp_multicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int8_t _zp_multicast_stop_read_task(_z_transport_t *zt);
void *_zp_multicast_read_task(void *ztm_arg); // The argument is void* to avoid incompatible pointer types in tasks

#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_READ_H */
4 changes: 2 additions & 2 deletions include/zenoh-pico/transport/unicast/lease.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "zenoh-pico/transport/transport.h"

int8_t _zp_unicast_send_keep_alive(_z_transport_unicast_t *ztu);
int _zp_unicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int _zp_unicast_stop_lease_task(_z_transport_t *zt);
int8_t _zp_unicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int8_t _zp_unicast_stop_lease_task(_z_transport_t *zt);
void *_zp_unicast_lease_task(void *ztu_arg); // The argument is void* to avoid incompatible pointer types in tasks

#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_LEASE_H */
4 changes: 2 additions & 2 deletions include/zenoh-pico/transport/unicast/read.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "zenoh-pico/transport/transport.h"

int8_t _zp_unicast_read(_z_transport_unicast_t *ztu);
int _zp_unicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int _zp_unicast_stop_read_task(_z_transport_t *zt);
int8_t _zp_unicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task);
int8_t _zp_unicast_stop_read_task(_z_transport_t *zt);
void *_zp_unicast_read_task(void *ztu_arg); // The argument is void* to avoid incompatible pointer types in tasks

#endif /* ZENOH_PICO_UNICAST_READ_H */
4 changes: 2 additions & 2 deletions src/transport/multicast/lease.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int8_t _zp_multicast_send_keep_alive(_z_transport_multicast_t *ztm) {
return ret;
}

int _zp_multicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
int8_t _zp_multicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
// Init memory
(void)memset(task, 0, sizeof(_z_task_t));
// Attach task
Expand All @@ -83,7 +83,7 @@ int _zp_multicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_
return _Z_RES_OK;
}

int _zp_multicast_stop_lease_task(_z_transport_t *zt) {
int8_t _zp_multicast_stop_lease_task(_z_transport_t *zt) {
zt->_transport._multicast._lease_task_running = false;
return _Z_RES_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions src/transport/multicast/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int8_t _zp_multicast_read(_z_transport_multicast_t *ztm) {
return ret;
}

int _zp_multicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
int8_t _zp_multicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
// Init memory
(void)memset(task, 0, sizeof(_z_task_t));
// Attach task
Expand All @@ -53,7 +53,7 @@ int _zp_multicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_t
return _Z_RES_OK;
}

int _zp_multicast_stop_read_task(_z_transport_t *zt) {
int8_t _zp_multicast_stop_read_task(_z_transport_t *zt) {
zt->_transport._multicast._read_task_running = false;
return _Z_RES_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions src/transport/unicast/lease.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int8_t _zp_unicast_send_keep_alive(_z_transport_unicast_t *ztu) {
return ret;
}

int _zp_unicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
int8_t _zp_unicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
// Init memory
(void)memset(task, 0, sizeof(_z_task_t));
// Attach task
Expand All @@ -43,7 +43,7 @@ int _zp_unicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_ta
return _Z_RES_OK;
}

int _zp_unicast_stop_lease_task(_z_transport_t *zt) {
int8_t _zp_unicast_stop_lease_task(_z_transport_t *zt) {
zt->_transport._unicast._lease_task_running = false;
return _Z_RES_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions src/transport/unicast/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int8_t _zp_unicast_read(_z_transport_unicast_t *ztu) {
return ret;
}

int _zp_unicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
int8_t _zp_unicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task) {
// Init memory
(void)memset(task, 0, sizeof(_z_task_t));
// Attach task
Expand All @@ -50,7 +50,7 @@ int _zp_unicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_tas
return _Z_RES_OK;
}

int _zp_unicast_stop_read_task(_z_transport_t *zt) {
int8_t _zp_unicast_stop_read_task(_z_transport_t *zt) {
zt->_transport._unicast._read_task_running = false;
return _Z_RES_OK;
}
Expand Down

0 comments on commit c79d74d

Please sign in to comment.