From 08909bd2ef53a6110fa2210fefa6d94647f5520f Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Fri, 19 Jun 2020 11:11:39 +0200 Subject: csv_free() Funktion gegen csv_cleanup() ersetzt, die bei EOF jetzt auch automatisch aufgreufen wird. --- csv-test.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'csv-test.c') diff --git a/csv-test.c b/csv-test.c index 30b5521..b2d210a 100644 --- a/csv-test.c +++ b/csv-test.c @@ -16,7 +16,6 @@ test(FILE *f) for ( int n; (n = csv_read(csv, f)) != -1; ) { ++line; } - csv_free(csv); return line; } @@ -31,7 +30,6 @@ test_exception(FILE *f) for ( int n; (n = csv_read(csv, f)) != -1; ) { if (++line == 500000) csv_field(csv, -1); } - csv_free(csv); return line; } @@ -57,7 +55,6 @@ test_exception_with_signal(FILE *f) for ( int n; (n = csv_read(csv, f)) != -1; ) { if (++line == 500000) csv_field(csv, -1); } - csv_free(csv); signal(SIGABRT, old_handler); @@ -93,11 +90,10 @@ test_exception_longjmp(FILE *f) // process data... if (++line == 500000) csv_field(csv, -1); } - csv_free(csv); return line; } else { - csv_free(csv); + csv_cleanup(csv); return -1; } } -- cgit v1.3