diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-27 09:03:51 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-27 09:03:51 +0200 |
| commit | 7c934801f88c640970ad41b5ddd39f4e39609f28 (patch) | |
| tree | 76a065db76fbcbdec818b8b6cc8b108ac1c9eb49 /src/solvers/coord/utils.h | |
| parent | 243a852d31483d10983c50978d1d4471efd0e553 (diff) | |
| download | nissy-core-7c934801f88c640970ad41b5ddd39f4e39609f28.tar.gz nissy-core-7c934801f88c640970ad41b5ddd39f4e39609f28.zip | |
Removed VLA notation from function parameters.
I found out that this gives undefined behavior when then size is 0.
Better not to have it at all, it is confusing for other developers anyway.
Diffstat (limited to 'src/solvers/coord/utils.h')
| -rw-r--r-- | src/solvers/coord/utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/solvers/coord/utils.h b/src/solvers/coord/utils.h index 6066049..5b8f538 100644 --- a/src/solvers/coord/utils.h +++ b/src/solvers/coord/utils.h | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | STATIC coord_t *parse_coord(size_t n, const char [n]); | 1 | STATIC coord_t *parse_coord(size_t, const char *); |
| 2 | STATIC uint8_t parse_axis(const char [static 2]); | 2 | STATIC uint8_t parse_axis(const char [static 2]); |
| 3 | STATIC void parse_coord_and_axis(const char *, coord_t **, uint8_t *); | 3 | STATIC void parse_coord_and_axis(const char *, coord_t **, uint8_t *); |
| 4 | STATIC long long dataid_coord(const char *, char [static NISSY_SIZE_DATAID]); | 4 | STATIC long long dataid_coord(const char *, char [static NISSY_SIZE_DATAID]); |
| 5 | 5 | ||
| 6 | STATIC coord_t * | 6 | STATIC coord_t * |
| 7 | parse_coord(size_t n, const char coord[n]) | 7 | parse_coord(size_t n, const char *coord) |
| 8 | { | 8 | { |
| 9 | int i; | 9 | int i; |
| 10 | 10 | ||
