mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Fix issues detected by clang
This commit is contained in:
@@ -179,7 +179,6 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime)
|
||||
|
||||
/* Start the watchdog */
|
||||
|
||||
errcode = OK;
|
||||
(void)wd_start(rtcb->waitdog, ticks, (wdentry_t)sem_timeout, 1, getpid());
|
||||
|
||||
/* Now perform the blocking wait */
|
||||
@@ -196,6 +195,11 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime)
|
||||
|
||||
wd_cancel(rtcb->waitdog);
|
||||
|
||||
if (errcode != OK)
|
||||
{
|
||||
goto errout_with_irqdisabled;
|
||||
}
|
||||
|
||||
/* We can now restore interrupts and delete the watchdog */
|
||||
|
||||
/* Success exits */
|
||||
|
||||
Reference in New Issue
Block a user