Remove C99 loop construct

This commit is contained in:
Tim Rühsen 2018-02-21 15:56:58 +01:00
parent 179ca703b2
commit 819486edd1
1 changed files with 2 additions and 1 deletions

View File

@ -1054,7 +1054,8 @@ const char *psl_unregistrable_domain(const psl_ctx_t *psl, const char *domain)
*/
int nlabels = 0;
for (const char *p = domain + strlen(domain) - 1; p >= domain; p--) {
const char *p;
for (p = domain + strlen(domain) - 1; p >= domain; p--) {
if (*p == '.' && ++nlabels > 8) {
domain = p + 1;
break;