Re: [PATCH v3] http: add support for specifying the SSL version
On Thu, Aug 13, 2015 at 12:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 7 quoted lines
> So, your loop can either look like this, if you use the NULL sentinel:
>
> struct ssl_map *p = sslversions;
> while (p->name) {
> if (!strcmp(ssl_version, p->name))
> ...
> }That's not quite correct. 'p' needs to be incremented, of course, so:
struct ssl_map *p;
for (p = sslversions; p->name; p++) {
if (!strcmp(ssl_version, p->name))
...
}would be nicely idiomatic.