Don't crash if one specify '-S' or '-s' and an invalid configuration file.
This commit is contained in:
parent
c14fa3c3a9
commit
26f1864c1f
11
src/main.c
11
src/main.c
|
@ -170,18 +170,19 @@ int check_configuration(int dump)
|
|||
|
||||
if (dump)
|
||||
{
|
||||
dump_config(&configuration, dump > 1);
|
||||
puts("");
|
||||
}
|
||||
|
||||
if (dump)
|
||||
if (ret != -1)
|
||||
{
|
||||
dump_config(&configuration, dump > 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ret == -1)
|
||||
{
|
||||
fprintf(stderr, "ERROR\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(stdout, "OK\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue