Re: [spice-gtk v2] channel: Move local variables to inner block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 17, 2017 at 11:35:07AM +0100, Pavel Grunt wrote:
> > @@ -2382,12 +2378,17 @@ static int
> > spice_channel_load_ca(SpiceChannel *channel)
> >      CHANNEL_DEBUG(channel, "Load CA, file: %s, data: %p", ca_file,
> > ca);
> >  
> >      if (ca != NULL) {
> > +        STACK_OF(X509_INFO) *inf;
> > +        X509_STORE *store;
> > +        BIO *in;
> > +
> >          store = SSL_CTX_get_cert_store(c->ctx);
> >          in = BIO_new_mem_buf(ca, size);
> >          inf = PEM_X509_INFO_read_bio(in, NULL, NULL, NULL);
> >          BIO_free(in);
> >  
> >          for (i = 0; i < sk_X509_INFO_num(inf); i++) {
> > +            X509_INFO *itmp;
> >              itmp = sk_X509_INFO_value(inf, i);
> >              if (itmp->x509) {
> >                  X509_STORE_add_cert(store, itmp->x509);
> 
> 
> OT: Is there any preference about using declaration & definition, or
> just definition if possible ?

Do you mean
int foo = 4;
VS
int foo;
foo = 4;
?

For me it's a complicated question, I think I usually do the latter,
even if you ask me I'd say I prefer the former ;) The former sometimes
lead to overlong lines, which means you need to split sometimes.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]