From 1d91ddd072c17a991129d6f296591f48a378ba0c Mon Sep 17 00:00:00 2001 From: Devashish Sharma Date: Mon, 16 Jan 2006 09:57:21 +0000 Subject: Small change to csv importer. svn path=/trunk/; revision=31207 --- addressbook/importers/evolution-csv-importer.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'addressbook/importers') 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 ++; } -- cgit