Clean up return code types

* Remove dds_return_t / dds_retcode_t distinction (now there is only
  dds_return_t and all error codes are always negative)

* Remove Q_ERR_... error codes and replace them by DDS_RETCODE_...
  ones so that there is only one set of error codes

* Replace a whole bunch "int" return types that were used to return
  Q_ERR_... codes by "dds_return_t" return types

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-05-23 16:51:43 +02:00 committed by eboasson
parent a652ecb78e
commit 19aec98b8a
126 changed files with 1565 additions and 1722 deletions

View file

@ -232,7 +232,7 @@ static void start_writing(
if (burstCount < burstSize)
{
status = dds_write (writer, sample);
if (dds_err_nr(status) == DDS_RETCODE_TIMEOUT)
if (status == DDS_RETCODE_TIMEOUT)
{
timedOut = true;
}
@ -285,7 +285,7 @@ static void start_writing(
static void finalize_dds(dds_entity_t participant, dds_entity_t writer, ThroughputModule_DataType sample)
{
dds_return_t status = dds_dispose (writer, &sample);
if (dds_err_nr (status) != DDS_RETCODE_TIMEOUT && status < 0)
if (status != DDS_RETCODE_TIMEOUT && status < 0)
DDS_FATAL("dds_dispose: %s\n", dds_strretcode(-status));
dds_free (sample.payload._buffer);