Skip to content
Snippets Groups Projects
Commit 4d85b7e7 authored by Dmitry Marakasov's avatar Dmitry Marakasov
Browse files

Set errno to 0 before sscanf, as sscanf doesn't set it to 0 if there were no error

parent 3efdc7bc
No related branches found
No related tags found
1 merge request!159Set errno to 0 before sscanf, as sscanf doesn't set it to 0 if there were no error
......@@ -143,6 +143,7 @@ static int cpt_parse_comment(const char *line, cpt_t *cpt)
{
char name[32], arg[32];
errno = 0;
switch (sscanf(line, " %31s = %31s ", name, arg))
{
case 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment