From 9b1e180cd81ad08c0c0f64e2986a5913809c7f14 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Thu, 30 Oct 2014 12:07:55 +0100 Subject: [PATCH] core: eliminate warning This initialized has actually no relevance and is just needed to suppress a compiler warning. --- core/hwtimer.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/core/hwtimer.c b/core/hwtimer.c index c68f2fa325..3c7152b458 100644 --- a/core/hwtimer.c +++ b/core/hwtimer.c @@ -150,16 +150,12 @@ static int _hwtimer_set(unsigned long offset, void (*callback)(void*), void *ptr unsigned state; - if (!inISR()) { - state = disableIRQ(); - } + state = disableIRQ(); int n = lifo_get(lifo); if (n == -1) { - if (!inISR()) { - restoreIRQ(state); - } + restoreIRQ(state); puts("No hwtimer left."); return -1; @@ -179,9 +175,7 @@ static int _hwtimer_set(unsigned long offset, void (*callback)(void*), void *ptr lpm_prevent_sleep++; - if (!inISR()) { - restoreIRQ(state); - } + restoreIRQ(state); return n; }