Commit 726f15eb authored by schneider's avatar schneider

refact(config): Use iscntrl to trim lines in epic_config_get_string

parent c67972e3
......@@ -323,10 +323,11 @@ int epic_config_get_string(const char *key, char *buf, size_t buf_len)
return -ENOENT;
}
char *eol = strchr(buf, '\n');
if (eol) {
*eol = '\0';
}
char *end = buf;
while (!iscntrl(*end))
end++;
*end = 0;
trim(buf);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment