mirror of
https://github.com/curl/curl.git
synced 2026-07-31 18:08:04 +03:00
src: cleanup ISBLANK vs ISSPACE
- use ISBLANK() where only spaces and tabs should match - change while(x && ISBLANK(X)) => while(ISBLANK(x)) Closes #16589
This commit is contained in:
parent
9147903366
commit
1503555836
5 changed files with 20 additions and 23 deletions
|
|
@ -1114,11 +1114,9 @@ static ParameterError parse_url(struct GlobalConfig *global,
|
|||
curlx_dyn_init(&line, 8092);
|
||||
while(my_get_line(f, &line, &error)) {
|
||||
const char *ptr = curlx_dyn_ptr(&line);
|
||||
|
||||
err = add_url(global, config, ptr, GETOUT_USEREMOTE | GETOUT_NOGLOB);
|
||||
if(err)
|
||||
break;
|
||||
curlx_dyn_reset(&line);
|
||||
}
|
||||
if(!fromstdin)
|
||||
fclose(f);
|
||||
|
|
@ -1146,12 +1144,12 @@ static ParameterError parse_localport(struct OperationConfig *config,
|
|||
if(*p) {
|
||||
pp = p;
|
||||
/* check for ' - [end]' */
|
||||
if(ISSPACE(*pp))
|
||||
if(ISBLANK(*pp))
|
||||
pp++;
|
||||
if(*pp != '-')
|
||||
return PARAM_BAD_USE;
|
||||
pp++;
|
||||
if(*pp && ISSPACE(*pp))
|
||||
if(ISBLANK(*pp))
|
||||
pp++;
|
||||
}
|
||||
msnprintf(buffer, sizeof(buffer), "%.*s", (int)plen, nextarg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue