Fixed: Passing this->_armed_sub to close, which cannot accept a negative number.

This commit is contained in:
Pavel Kirienko 2015-01-19 15:54:14 +03:00 committed by Lorenz Meier
parent 91362223ea
commit 4baf4a032f
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ UavcanNode::teardown()
_control_subs[i] = -1;
}
}
return ::close(_armed_sub);
return (_armed_sub >= 0) ? ::close(_armed_sub) : 0;
}
int