From 8011a9476d26f3dada48778d14d3906ddf1d22fa Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sat, 20 Apr 2013 15:24:12 +0200 Subject: [PATCH] OP-886 fixed a bug caused by wrong check for xSemaphoreTakeRecursive return code Conflicts: flight/Libraries/alarms.c --- flight/Libraries/alarms.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/flight/Libraries/alarms.c b/flight/Libraries/alarms.c index b3706ba24..78238a3bf 100644 --- a/flight/Libraries/alarms.c +++ b/flight/Libraries/alarms.c @@ -70,9 +70,7 @@ int32_t AlarmsSet(SystemAlarmsAlarmElem alarm, SystemAlarmsAlarmOptions severity } // Lock - if (xSemaphoreTakeRecursive(lock, portMAX_DELAY) != 0) { - return -1; - } + xSemaphoreTakeRecursive(lock, portMAX_DELAY); // Read alarm and update its severity only if it was changed SystemAlarmsGet(&alarms); @@ -108,9 +106,7 @@ int32_t ExtendedAlarmsSet(SystemAlarmsAlarmElem alarm, } // Lock - if (xSemaphoreTakeRecursive(lock, portMAX_DELAY) != 0) { - return -1; - } + xSemaphoreTakeRecursive(lock, portMAX_DELAY); // Read alarm and update its severity only if it was changed SystemAlarmsGet(&alarms);