On Thu, Aug 13, 2015 at 12:37 PM, Eric Sunshine <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html