[riot-notifications] [RIOT] net: initial import of the ZEP protocol (#2627)

Cenk Gündoğan notifications at github.com
Tue Jun 23 20:45:31 CEST 2015


> +            case -EOVERFLOW:
> +                puts("error: too many threads running");
> +
> +            default:
> +                puts("unexpected error");
> +        }
> +
> +        return 1;
> +    }
> +
> +    if ((res = ng_nomac_init(zep_stack, sizeof(zep_stack), THREAD_PRIORITY_MAIN - 3,
> +                             "zep_l2", (ng_netdev_t *)&zep)) < 0) {
> +        switch (res) {
> +            case -EOVERFLOW:
> +                puts("error: too many threads running");
> +

switch statements should break by default and only slide through if specified by a keyword .. this would be much less error-prone :dart: 

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


More information about the notifications mailing list