[riot-notifications] [RIOT] Issue 147 (#151)

LudwigOrtmann notifications at github.com
Sun Aug 18 10:57:05 CEST 2013


> @@ -369,7 +369,7 @@ int register_interrupt(int sig, void *handler)
>  
>      native_irq_handlers[sig].func = handler;
>  
> -    sa.sa_sigaction = (void *) native_isr_entry;
> +    sa.sa_sigaction = &native_isr_entry;

This wasn't a bug as void and function pointers can be cast both ways without loss of information (at least my K&R says so) and the signatures match. If the signatures would not have matched the cast would have hidden this though, so it's theoretically better now.
My K&R also says the `&` operator can be omitted as the compiler already knows it's a function, so I'll change this again for nicer looks ;-)

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/151/files#r5831058
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130818/89dd631a/attachment.html>


More information about the notifications mailing list