diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-22 06:43:11 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-22 18:45:47 +0100 |
| commit | ce3f1cc0ef9f46d70ab5387b1458e9098b40711d (patch) | |
| tree | 4949745670b829f2211381bf14b8440dcc6ca7b1 /test/012_math_permsign/permsign_tests.c | |
| parent | 0550a16c1cce868bbc3f3b5ad59f80e35cf2a6cd (diff) | |
| download | nissy-core-ce3f1cc0ef9f46d70ab5387b1458e9098b40711d.tar.gz nissy-core-ce3f1cc0ef9f46d70ab5387b1458e9098b40711d.zip | |
Some safety with move arrays, small refactor appendchar
Diffstat (limited to 'test/012_math_permsign/permsign_tests.c')
| -rw-r--r-- | test/012_math_permsign/permsign_tests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/012_math_permsign/permsign_tests.c b/test/012_math_permsign/permsign_tests.c index fa8ce9b..0ec22af 100644 --- a/test/012_math_permsign/permsign_tests.c +++ b/test/012_math_permsign/permsign_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int permsign(uint8_t *, int64_t); | 3 | int permsign(size_t n, const uint8_t [n]); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| @@ -16,6 +16,6 @@ void run(void) { | |||
| 16 | a[i] = atoi(str); | 16 | a[i] = atoi(str); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | p = permsign(a, n); | 19 | p = permsign(n, a); |
| 20 | printf("%d\n", p); | 20 | printf("%d\n", p); |
| 21 | } | 21 | } |
