Re: buildkernel is broken
- In reply to: Kristof Provost : "Re: buildkernel is broken"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Jul 2022 18:07:02 UTC
On Thu, Jul 07, 2022 at 07:59:29PM +0200, Kristof Provost wrote: > On 7 Jul 2022, at 19:00, Steve Kargl wrote: > > > The fix in > > 37f604b49d4a seems rather questionable especially given > > that there is no comment about why the macro is expanded > > to a zero-trip loop. > > > I’m not sure how I could have been much more clear than this: > > VNET_FOREACH() is a LIST_FOREACH if VIMAGE is set, but empty if it's > not. This means that users of the macro couldn't use 'continue' or > 'break' as one would expect of a loop. Comments belong in the code. /* Kludge to prevent non-vimage kernels from choking to death. */ #define VNET_FOREACH(arg) for (int _vn = 0; _vn == 0; _vn++) -- Steve