Skip to content
Permalink
Browse files
Remove redundant continue in for loops
  • Loading branch information
teresy authored and nikic committed Nov 20, 2018
1 parent ef8fbd6 commit 8881c3c82f75bd67578a774c40888b257a30a18f
Showing 2 changed files with 3 additions and 7 deletions.
@@ -154,9 +154,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
}

/* It stops at the first '$', max 8 chars */
for (ep = sp; *ep != '\0' && *ep != '$' && ep < (sp + 8); ep++) {
continue;
}
for (ep = sp; *ep != '\0' && *ep != '$' && ep < (sp + 8); ep++);

/* get the length of the true salt */
sl = (DWORD)(ep - sp);
@@ -335,8 +333,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
sp += MD5_MAGIC_LEN;

/* It stops at the first '$', max 8 chars */
for (ep = sp; *ep != '\0' && *ep != '$' && ep < (sp + 8); ep++)
continue;
for (ep = sp; *ep != '\0' && *ep != '$' && ep < (sp + 8); ep++);

/* get the length of the true salt */
sl = ep - sp;
@@ -191,8 +191,7 @@ PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, c
*dst = '\0';
} else {
/* XXX - optimize */
for (sign = decpt, i = 0; (sign /= 10) != 0; i++)
continue;
for (sign = decpt, i = 0; (sign /= 10) != 0; i++);
dst[i + 1] = '\0';
while (decpt != 0) {
dst[i--] = '0' + decpt % 10;

0 comments on commit 8881c3c

Please sign in to comment.