On Thu, Aug 13, 2015 at 12:37 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to