Skip to content

Commit

Permalink
fixed compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Aug 31, 2023
1 parent b4de388 commit c00708d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions util/url-scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,25 @@ url_web_end (const char *in, const char *pos, const char *inend, urlmatch_t *mat
/* find the end of the domain */
if (is_digit (*inptr)) {
/* this is either an IP literal or it could be a subdomain that begins with a numeric character(s) */
end = inptr;
while (end < inend && is_digit (*end))
end++;
save = inptr;
while (inptr < inend && is_digit (*inptr))
inptr++;

if (end < inend && *end == '.')
if (inptr < inend && *inptr == '.') {
inptr = save;
goto ip_literal2;
}

if (is_atom (*end))
if (is_atom (*inptr)) {
inptr = save;
goto atom;
}

return FALSE;
} else if (is_atom (*inptr)) {
atom:
/* might be a domain or user@domain */
save = inptr;
atom:
while (inptr < inend) {
if (!is_atom (*inptr))
break;
Expand Down

0 comments on commit c00708d

Please sign in to comment.