diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/importers/evolution-csv-importer.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 034b1b3601..09627532a4 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -469,16 +469,12 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { GString *str; char *buf; - while (!feof (f)) { - if(!fgets(line, sizeof(line),f)) - break; - } + if(!fgets(line, sizeof(line),f)) + return NULL; if(gci->count == 0 && importer != MOZILLA_IMPORTER) { - while (!feof (f) ) { - if(!fgets(line, sizeof(line),f)) - break; - } + if(!fgets(line, sizeof(line),f)) + return NULL; gci->count ++; } |