mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:23:36 +03:00
tool_parsecfg: make my_get_line skip comments and newlines
- brings this functionality to all users of this function automatically and consistently - consistently returns every line without trailing \n Closes #16590
This commit is contained in:
parent
d398fffae0
commit
a7fda9a8f4
3 changed files with 41 additions and 71 deletions
|
|
@ -87,11 +87,6 @@ CURLcode tool_ssls_load(struct GlobalConfig *global,
|
|||
curl_free(shmac);
|
||||
curl_free(sdata);
|
||||
line = Curl_dyn_ptr(&buf);
|
||||
while(*line && ISBLANK(*line))
|
||||
line++;
|
||||
if(*line == '#')
|
||||
/* skip commented lines */
|
||||
continue;
|
||||
|
||||
c = memchr(line, ':', strlen(line));
|
||||
if(!c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue