Use RMW_RET_NODE_NAME_NON_EXISTENT only if defined

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-09-24 20:58:48 +02:00 committed by eboasson
parent c2c69ac032
commit a55c9cb605

View file

@ -2442,9 +2442,14 @@ static rmw_ret_t get_node_guids(
if (ret != RMW_RET_OK) { if (ret != RMW_RET_OK) {
return ret; return ret;
} else if (guids.size() == 0) { } else if (guids.size() == 0) {
/* It appears the get_..._by_node operations are supposed to return NODE_NAME_NON_EXISTENT /* It appears the get_..._by_node operations are supposed to return
if no such node exists */ NODE_NAME_NON_EXISTENT (newly introduced in Eloquent) or ERROR
(on Dashing and earlier) if no such node exists */
#ifdef RMW_RET_NODE_NAME_NON_EXISTENT
return RMW_RET_NODE_NAME_NON_EXISTENT; return RMW_RET_NODE_NAME_NON_EXISTENT;
#else
return RMW_RET_ERROR;
#endif
} else { } else {
return RMW_RET_OK; return RMW_RET_OK;
} }