From: Eric Sunshine Date: Thu, 13 Aug 2015 16:49:16 GMT Subject: Re: [PATCH v3] http: add support for specifying the SSL version Message-ID: In-Reply-To: On Thu, Aug 13, 2015 at 12:37 PM, Eric Sunshine 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.