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:
Daniel Stenberg 2025-03-06 11:38:23 +01:00
parent d398fffae0
commit a7fda9a8f4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 41 additions and 71 deletions

View file

@ -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) {