mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries to treat it as a file descriptor and there are checks for < 0 and ::close calls on orb_advert_t types which is an invalid use of an object pointer, which is what orb_advert_t really is. Initially I had changed the -1 initializations to 0 but it was suggested that this should be nullptr. That was a good recommendation but the definition of orb_advert_t had to change to void * because you cannot initialize a uintptr_t as nullptr. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Lorenz Meier
parent
180c8b0cb0
commit
1ca05aaa64
@@ -482,7 +482,7 @@ static transition_result_t disable_publication(const int mavlink_fd)
|
||||
/**
|
||||
* Transition from one hil state to another
|
||||
*/
|
||||
transition_result_t hil_state_transition(hil_state_t new_state, int status_pub, struct vehicle_status_s *current_status, const int mavlink_fd)
|
||||
transition_result_t hil_state_transition(hil_state_t new_state, orb_advert_t status_pub, struct vehicle_status_s *current_status, const int mavlink_fd)
|
||||
{
|
||||
transition_result_t ret = TRANSITION_DENIED;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user