lkml.org 
[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] kernel.h: provide array iterator
Proper form for iteration over an array is below:

int a[] = {1, 2, 3, 5};
for (int x: a) {
...
}

Your macro forces an iterator to be pointer which is uh-oh.

\
 
 \ /
  Last update: 2018-03-16 21:05    [W:0.137 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site