Browse Source

Missed a check for < 0

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
sbg
Mark Charlebois 10 years ago committed by Lorenz Meier
parent
commit
b990d9fa7e
  1. 2
      src/modules/uORB/uORBDevices_posix.cpp

2
src/modules/uORB/uORBDevices_posix.cpp

@ -284,7 +284,7 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v @@ -284,7 +284,7 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v
{
//warnx("uORB::DeviceNode::publish meta = %p", meta);
if (handle < 0) {
if (handle == 0) {
warnx("uORB::DeviceNode::publish called with invalid handle");
errno = EINVAL;
return ERROR;

Loading…
Cancel
Save