On Fri, Dec 07, 2018 at 02:44:12PM +0000, Vladimir Sementsov-Ogievskiy wrote:
> 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

Yes, I'm fine with size_t too

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

Reply via email to