From fbc7b6aa36b2496e65c4f56ba68c50d10f52eb79 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 18 Jun 2020 08:37:21 +0200 Subject: Parameter werden nun überall wo möglich geprüft. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- csv-test.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'csv-test.c') diff --git a/csv-test.c b/csv-test.c index 6c32a04..0d9d6e1 100644 --- a/csv-test.c +++ b/csv-test.c @@ -74,6 +74,7 @@ INLINE void csv_string_append(csv_string_t *csv_string, char ch, const csv_options_t * const csv_options) { assert(csv_string != NULL); + assert(csv_options != NULL); static const int INITIAL_CAP = 16; @@ -141,6 +142,7 @@ INLINE void csv_field_append(csv_field_t *csv_field, int idx, const csv_options_t * const csv_options) { assert(csv_field != NULL); + assert(csv_options != NULL); static const size_t INITIAL_CAP = 16; @@ -250,6 +252,7 @@ int csv_read(csv_t *csv, FILE *in) { assert(csv != NULL); + assert(in != NULL); enum { STATE_START_FIELD, @@ -395,6 +398,8 @@ static void csv_write_field(const csv_options_t * const csv_options, const char *field, FILE *out) { assert(csv_options != NULL); + assert(field != NULL); + assert(out != NULL); const char QUOTE = csv_options->quote_symbol; @@ -419,6 +424,8 @@ void csv_write(const csv_options_t * const csv_options, int n, const char *fields[], FILE *out) { assert(csv_options != NULL); + assert(fields != NULL); + assert(out != NULL); const char SEP = csv_options->quote_symbol; -- cgit v1.3