mirror of
git://projects.qi-hardware.com/fped.git
synced 2025-04-21 12:27:27 +03: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:
3
fped.c
3
fped.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user