sched/wdog: Fix code style

This commit fixed code style issue left by the previous patch.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen 2024-10-10 09:23:05 +08:00 committed by Xiang Xiao
parent 20cba94a86
commit 93890321c5
1 changed files with 5 additions and 3 deletions

View File

@ -91,6 +91,10 @@ int wd_cancel(FAR struct wdog_s *wdog)
int wd_cancel_irq(FAR struct wdog_s *wdog) int wd_cancel_irq(FAR struct wdog_s *wdog)
{ {
bool head;
/* Make sure that the watchdog is valid and still active. */
if (wdog == NULL || !WDOG_ISACTIVE(wdog)) if (wdog == NULL || !WDOG_ISACTIVE(wdog))
{ {
return -EINVAL; return -EINVAL;
@ -103,9 +107,7 @@ int wd_cancel_irq(FAR struct wdog_s *wdog)
* cancellation is complete * cancellation is complete
*/ */
/* Make sure that the watchdog is still active. */ head = list_is_head(&g_wdactivelist, &wdog->node);
bool head = list_is_head(&g_wdactivelist, &wdog->node);
/* Now, remove the watchdog from the timer queue */ /* Now, remove the watchdog from the timer queue */