mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 02:43:34 +08:00
Missed a check for < 0
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Lorenz Meier
parent
a734fc96d1
commit
b990d9fa7e
@@ -284,7 +284,7 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v
|
|||||||
{
|
{
|
||||||
//warnx("uORB::DeviceNode::publish meta = %p", meta);
|
//warnx("uORB::DeviceNode::publish meta = %p", meta);
|
||||||
|
|
||||||
if (handle < 0) {
|
if (handle == 0) {
|
||||||
warnx("uORB::DeviceNode::publish called with invalid handle");
|
warnx("uORB::DeviceNode::publish called with invalid handle");
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user