[riot-devel] Coding conventions amendment

Oleg Hahm oliver.hahm at inria.fr
Thu Oct 13 22:54:24 CEST 2016


Kaspar,

On Thu, Oct 13, 2016 at 10:42:11PM +0200, Kaspar Schleiser wrote:
> On 10/13/2016 09:43 PM, Kees Bakker wrote:
> >>> Does anybody object to adding this to the coding
> >>> >> conventions explicitly?
> >> > What about `size_t`?
> > +1 for size_t
> 
> Well, any convention would need careful wording.
> 
> ```
> for (uint32_t timeout = 1; timeout < (10LU*1000*1000); timeout *= 2) {
> 	if(try()) break;
> }
> ```
> 
> ... cannot blindly by convention converted to size_t as loop variable.
> 
> IMHO this example also answers Oleg's initial concern: sometimes int or
> unsigned int or size_t just don't work.

Thanks for pointing this out. So, it should rather go into the BCP than. 

Cheers,
Oleg
-- 
/*
 * We used to try various strange things. Let's not.
 */
        linux-2.2.16/fs/buffer.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20161013/9a07a158/attachment.sig>


More information about the devel mailing list