On Wed, Jan 18, 2023 at 11:58:19AM +0100, Thomas Huth wrote: > On 18/01/2023 11.29, Daniel P. Berrangé wrote: > > On Wed, Jan 18, 2023 at 05:25:37AM -0500, Michael S. Tsirkin wrote: > > > On Mon, Jan 16, 2023 at 11:18:19AM +0000, Daniel P. Berrangé wrote: > > > > > + for (uint32_t i = 0; i < QCRYPTODEV_BACKEND_SERVICE__MAX; i++) { > > > > > > > > QEMU coding style doesn't declare types inside the for() control > > > > conditions. I'd suggest 'size_t i', and put it at top of this > > > > function. > > > > > > It's actually kind of vague: > > > > > > Mixed declarations (interleaving statements and declarations within > > > blocks) are generally not allowed; declarations should be at the > > > beginning > > > of blocks. > > > > > > for loop starts a block, does it not? > > > > I wasn't refering to the specific docs per-se, but rather that no > > code does this at all in QEMU. It is effectively our style, even > > if not documented as such > > $ grep -r 'for (int ' * | wc -l > 381 > > ... we're using it in many places already, and I think it should be OK since > we started using gnu99 and later as a base standard. Just my 0.02 cents.
Sigh, my bad grepping skills, i missed the space between for and (. I withdraw my objection. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|