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/common.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 '')
| -rw-r--r-- | src/solvers/coord/common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/solvers/coord/common.h b/src/solvers/coord/common.h index 8fd405c..c512b33 100644 --- a/src/solvers/coord/common.h +++ b/src/solvers/coord/common.h | |||
| @@ -9,7 +9,7 @@ STATIC size_t coord_gendata_generic(const coord_t [static 1], unsigned char *); | |||
| 9 | STATIC void append_coord_name(const coord_t [static 1], char *); | 9 | STATIC void append_coord_name(const coord_t [static 1], char *); |
| 10 | STATIC bool solution_lastqt_cw(const solution_moves_t [static 1]); | 10 | STATIC bool solution_lastqt_cw(const solution_moves_t [static 1]); |
| 11 | STATIC bool coord_can_switch(const coord_t [static 1], const unsigned char *, | 11 | STATIC bool coord_can_switch(const coord_t [static 1], const unsigned char *, |
| 12 | size_t n, const uint8_t [n]); | 12 | size_t, const uint8_t *); |
| 13 | 13 | ||
| 14 | STATIC uint64_t | 14 | STATIC uint64_t |
| 15 | coord_coord_generic( | 15 | coord_coord_generic( |
| @@ -164,7 +164,7 @@ coord_can_switch( | |||
| 164 | const coord_t coord[static 1], | 164 | const coord_t coord[static 1], |
| 165 | const unsigned char *data, | 165 | const unsigned char *data, |
| 166 | size_t n, | 166 | size_t n, |
| 167 | const uint8_t moves[n] | 167 | const uint8_t *moves |
| 168 | ) | 168 | ) |
| 169 | { | 169 | { |
| 170 | /* | 170 | /* |
