mirror of
https://github.com/curl/curl.git
synced 2026-04-15 02:51:42 +03:00
telnet: simplify the implementation of str_is_nonascii()
There is no need to traverse the string twice. Closes #10852
This commit is contained in:
parent
1903b95e4c
commit
d92a5007b6
1 changed files with 4 additions and 5 deletions
|
|
@ -772,12 +772,11 @@ static void printsub(struct Curl_easy *data,
|
|||
|
||||
static bool str_is_nonascii(const char *str)
|
||||
{
|
||||
size_t len = strlen(str);
|
||||
while(len--) {
|
||||
if(*str & 0x80)
|
||||
char c;
|
||||
while((c = *str++))
|
||||
if(c & 0x80)
|
||||
return TRUE;
|
||||
str++;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue