06.12.2018 13:54, Daniel P. Berrangé wrote: >> @@ -31,8 +32,12 @@ struct QCryptoBlock { >> const QCryptoBlockDriver *driver; >> void *opaque; >> >> - QCryptoCipher *cipher; >> + QCryptoCipher **ciphers; >> + int n_ciphers; >> + int n_free_ciphers; > size_t for both of these since they're effectively array indexes. > >> QCryptoIVGen *ivgen; >> + QemuMutex mutex; >> + >> QCryptoHashAlgorithm kdfhash; >> size_t niv; >> uint64_t payload_offset; /* In bytes */ >> @@ -46,6 +51,7 @@ struct QCryptoBlockDriver { >> QCryptoBlockReadFunc readfunc, >> void *opaque, >> unsigned int flags, >> + int n_threads, > unsigned int, and more below which I won't repeat... >
Why not size_t here, then? this parameter directly maps into n_ciphers -- Best regards, Vladimir