cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: polarssl: add ALPN support

From: Fabian Frank <fabian.frank.de_at_gmail.com>
Date: Fri, 23 May 2014 17:15:55 -0700

On May 22, 2014, at 10:15 AM, Fabian Frank <fabian.frank.de_at_gmail.com> wrote:

>
> On May 21, 2014, at 11:38 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
>> You can also eliminate a #ifdef block by moving the definition of this
>> into the existing #ifdef block where it's being used.
>>
>> +#ifdef HAS_ALPN
>> + const char* next_protocol;
>> +#endif
>>
>> And the same with this one. The fewer #ifdef blocks, the easier to read.
>
> Previously people pointed out that variable definitions have to be at the top of functions in curl code, which is why I have done it this way. Before that I had them inside the ifdef blocks, as you suggested. I am ok with either one, as long as it’s clear which one we want. :-)

Can somebody give a definite answer on which style is preferred? Daniel? I will then revise the patch. :-)

Thank you Dan for looking at the patch!

Regards,
Fabian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-24