diff options
| author | Thomas Schmucker <ts@its1.de> | 2025-04-10 22:43:55 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2025-04-10 22:43:55 +0200 |
| commit | 0140964a5972f10312f3b93c23f4903f510c09e8 (patch) | |
| tree | 65403318c4071046043872c63ad3b476c5ffddf9 | |
| parent | 41d8eaca5bbe16144cbb0d98c8522c8f6a137c1d (diff) | |
| download | libcsv-0140964a5972f10312f3b93c23f4903f510c09e8.tar.gz libcsv-0140964a5972f10312f3b93c23f4903f510c09e8.tar.bz2 libcsv-0140964a5972f10312f3b93c23f4903f510c09e8.zip | |
minor changes
| -rw-r--r-- | csv-perf.c | 2 | ||||
| -rw-r--r-- | csv-test.c | 3 | ||||
| -rw-r--r-- | csv.c | 2 |
3 files changed, 3 insertions, 4 deletions
| @@ -1,6 +1,4 @@ | |||
| 1 | #include <assert.h> | 1 | #include <assert.h> |
| 2 | #include <setjmp.h> | ||
| 3 | #include <signal.h> | ||
| 4 | #include <stdio.h> | 2 | #include <stdio.h> |
| 5 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 6 | #include <time.h> | 4 | #include <time.h> |
| @@ -16,7 +16,7 @@ | |||
| 16 | (void) fclose(f); \ | 16 | (void) fclose(f); \ |
| 17 | f = NULL | 17 | f = NULL |
| 18 | 18 | ||
| 19 | #define UNUSED(x) (void) (sizeof((x), 0)) | 19 | #define UNUSED(x) (void) (x) |
| 20 | 20 | ||
| 21 | void | 21 | void |
| 22 | test_empty_object(void) | 22 | test_empty_object(void) |
| @@ -508,6 +508,7 @@ my_allocate(size_t n, size_t size, void *cb_arg) | |||
| 508 | UNUSED(cb_arg); | 508 | UNUSED(cb_arg); |
| 509 | 509 | ||
| 510 | void *ptr = calloc(n, size); | 510 | void *ptr = calloc(n, size); |
| 511 | |||
| 511 | return ptr; | 512 | return ptr; |
| 512 | } | 513 | } |
| 513 | 514 | ||
| @@ -260,7 +260,7 @@ csv_field(const csv_t *const csv, size_t idx) | |||
| 260 | assert(csv != NULL); | 260 | assert(csv != NULL); |
| 261 | assert(idx >= 0 && idx < csv->csv_field.pos); | 261 | assert(idx >= 0 && idx < csv->csv_field.pos); |
| 262 | 262 | ||
| 263 | if ( idx < 0 || idx >= csv->csv_field.pos ) { | 263 | if ( idx >= csv->csv_field.pos ) { |
| 264 | csv_fatal_error(CSV_ERR_OUT_OF_RANGE, csv->csv_options); | 264 | csv_fatal_error(CSV_ERR_OUT_OF_RANGE, csv->csv_options); |
| 265 | return NULL; | 265 | return NULL; |
| 266 | } | 266 | } |
