diff --git a/apps/Kernel/LowPowerTimerDriverP.nc b/apps/Kernel/LowPowerTimerDriverP.nc index a8067ed6d4..75c0bc9dc7 100644 --- a/apps/Kernel/LowPowerTimerDriverP.nc +++ b/apps/Kernel/LowPowerTimerDriverP.nc @@ -43,7 +43,7 @@ implementation void enqueue_cb(uint16_t idx) { - if ((cb_widx + 1) & (CBQUEUESIZE-1) == cb_ridx) + if (((cb_widx + 1) & (CBQUEUESIZE - 1)) == cb_ridx) return; //drop callback_queue[cb_widx] = timer_buffer[idx].cb; cb_widx = (cb_widx+1) & (CBQUEUESIZE-1); @@ -188,4 +188,4 @@ implementation post update_queues(); } -} \ No newline at end of file +} diff --git a/apps/Kernel/StormSimpleGPIOP.nc b/apps/Kernel/StormSimpleGPIOP.nc index 3b724c748a..135396a5d4 100644 --- a/apps/Kernel/StormSimpleGPIOP.nc +++ b/apps/Kernel/StormSimpleGPIOP.nc @@ -223,7 +223,7 @@ implementation uint8_t port = arg0 >> 8; uint8_t pin = arg0 & 0xFF; uint32_t pinmask = 1 << (arg0 & 0xFF); - if ((irq_allowed[port] & pinmask == 0)) + if ((irq_allowed[port] & pinmask) == 0) return (uint32_t) -1; irq_callback[port][pin].addr = arg2; irq_callback[port][pin].r = (void*) argx[0]; diff --git a/apps/Kernel/TimerDriverP.nc b/apps/Kernel/TimerDriverP.nc index 724cf71d77..6c0f9ba42b 100644 --- a/apps/Kernel/TimerDriverP.nc +++ b/apps/Kernel/TimerDriverP.nc @@ -196,7 +196,7 @@ implementation } case 0x05: //cancel(id) ->int32 0 for ok -1 for fail { - if (arg0 >= BUFSIZE) return (uint32_t)-1; + if (arg0 >= BUFSIZE) return (uint32_t) -1; if (timer_buffer[arg0].flags == 0) return (uint32_t) -2; timer_buffer[arg0].flags = 0; return 0;