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 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 :|