[riot-devel] Coding conventions amendment

Oleg Hahm oliver.hahm at inria.fr
Wed Oct 12 17:00:51 CEST 2016


Hi Martin!

On Wed, Oct 12, 2016 at 04:52:37PM +0200, Landsmann, Martin wrote:
> > On Wed, Oct 12, 2016 at 12:57:50PM +0200, Ludwig Knüpfer wrote:
> > > Am 12. Oktober 2016 09:48:28 MESZ, schrieb Oleg Hahm <oliver.hahm at inria.fr>:
> > > > as far I'm concerned it has been an undocumented coding convention so far
> > > > to use `int` or `unsigned int` for iterator variables in a loop instead of
> > > > fixed width integer types. Does anybody object to adding this to the coding
> > > > conventions explicitly?
> > > What about `size_t`?
> > I don't see a reason against `size_t` - but also no good reason that speaks
> > for it. What's the rationale?
> size_t is suited best to be used for iterating array indices and never
> overflow holding them [1].
> 
> [1] http://stackoverflow.com/a/2550799

Sorry, I don't get this. Can you elaborate?

Cheers,
Oleg
-- 
printk(KERN_WARNING MYNAM ": (time to go bang on somebodies door)\n");
        linux-2.6.6/drivers/message/fusion/mptctl.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/20161012/8bed541a/attachment.sig>


More information about the devel mailing list