1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-25 17:55:00 +02:00

- fped.c (load_file): don't falsely complain about empty files

git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5925 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner 2010-04-20 03:16:09 +00:00
parent 6b22c8a579
commit b7db446cbb

3
fped.c
View File

@ -41,9 +41,12 @@ static void load_file(const char *name)
file = fopen(name, "r");
if (file) {
if (!fgets(line, sizeof(line), file)) {
if (ferror(file)) {
perror(name);
exit(1);
}
*line = 0;
}
no_save = strcmp(line, MACHINE_GENERATED);
fclose(file);
reporter = report_parse_error;