[riot-notifications] [RIOT] Refactor 6LoWPAN module (#133)

Martin Lenders notifications at github.com
Wed Aug 14 15:45:44 CEST 2013


> + * @{
> + * @file
> + * @brief   6LoWPAN error codes
> + * @author  Martin Lenders <mlenders at inf.fu-berlin.de>
> + * @}
> + */
> +
> +#ifndef SIXLOWPAN_ERROR_H
> +#define SIXLOWPAN_ERROR_H
> +
> +#ifndef SUCCESS
> +/**
> + * Functions return this if call was success. Only defined if not
> + * already defined by other header.
> + */
> +#define SUCCESS                 (0)

My line of thinking was the was the one that Ludwig proposed. Zero as code for an error is impractical, since you most likely call these type of functions like this

```C
if (somefunction() < 0) {
    handle_error()
}
```

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


More information about the notifications mailing list