Skip to content

Commit

Permalink
cpu/native/irq_cpu.c: fix cpp.check unitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fjmolinas committed Nov 21, 2019
1 parent 00c21e2 commit 1e671ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/native/irq_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ int irq_is_in(void)
int _native_popsig(void)
{
int nread, nleft, i;
int sig;
int sig = -1;

This comment has been minimized.

Copy link
@kaspar030

kaspar030 Nov 21, 2019

Contributor

"0" would be a better choice, as the only user (right below) uses this result as index into native_irq_handlers, which has a safe NULL as default in native_irq_handlers[0], but native_irq_handlers[-1] would segfault.


nleft = sizeof(int);
i = 0;
Expand Down

0 comments on commit 1e671ac

Please sign in to comment.