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

Oleg Hahm notifications at github.com
Wed Aug 14 15:20:00 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)

Well, I'd say it depends on the function, but coding conventions say:
```
* Any function must return one of the following values: 
 * logical value (zero or not zero)
 * an error code (given as a negative number or zero) or a positive status value
 * the count of read or written bytes/values for I/O functions
 * the position or address (for search functions)
 * a pointer
* NULL indicates an error case, too.
```

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


More information about the notifications mailing list