From 9a40fe4edeb2874ee1ec280b863d43825b92df7a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 19 Jan 2015 14:07:41 +0100 Subject: Sensors: Fix corner case on FD leak (not a real leak) --- src/modules/sensors/sensors.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/sensors/sensors.cpp') diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 2c798af3b..793b7c2b6 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2012-2014 PX4 Development Team. All rights reserved. + * Copyright (c) 2012-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1465,7 +1465,7 @@ Sensors::parameter_update_poll(bool forced) /* this sensor is optional, abort without error */ - if (fd > 0) { + if (fd >= 0) { struct airspeed_scale airscale = { _parameters.diff_pres_offset_pa, 1.0f, -- cgit v1.2.3