Skip to content
Snippets Groups Projects
Commit 14972657 authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

Remove all whitespace character before parsing the config or info file

parent 83269358
No related branches found
No related tags found
1 merge request!19Windows line ending bug fixed
......@@ -286,15 +286,13 @@ int write_data_to_file(const void *buf, uint32_t buf_size, const char *output_pr
static void remove_spaces(char *s)
{
const char *d;
const char *d = s;
if (!s)
return;
d = s;
do {
while (*d == ' ' || *d == '\t')
while (isspace(*d))
d++;
} while ((*s++ = *d++) != '\0');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment