Don't crash if one specify '-S' or '-s' and an invalid configuration file.

This commit is contained in:
Jan Vidar Krey 2009-03-24 23:10:51 +01:00
parent c14fa3c3a9
commit 26f1864c1f

View File

@ -170,18 +170,19 @@ int check_configuration(int dump)
if (dump) if (dump)
{ {
dump_config(&configuration, dump > 1); if (ret != -1)
puts(""); {
} dump_config(&configuration, dump > 1);
}
if (dump)
return 0; return 0;
}
if (ret == -1) if (ret == -1)
{ {
fprintf(stderr, "ERROR\n"); fprintf(stderr, "ERROR\n");
return 1; return 1;
} }
fprintf(stdout, "OK\n"); fprintf(stdout, "OK\n");
return 0; return 0;
} }