diff options
| author | Ariel Otilibili <ariel.otilibili@6wind.com> | 2025-01-06 15:45:30 +0100 |
|---|---|---|
| committer | Ariel Otilibili <ariel.otilibili@6wind.com> | 2025-01-06 15:47:55 +0100 |
| commit | 84d0ab9896f090ea21c9e3396c837058d50dd9ed (patch) | |
| tree | e4729dfbc125aa268aa79f0025edf33d69463e26 /tests/helpers/c/prng.c | |
| parent | 8ca4c3d0988c169ed41557727f45b69c8ce3aa0b (diff) | |
tests: clear -Wcalloc-transposed-args warnings
* order of arguments was swapped; not consistent with calloc signature
* therefore producing -Wcalloc-transposed-args during compilation.
Link: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Link: https://man7.org/linux/man-pages/man3/calloc.3p.html
Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
Diffstat (limited to 'tests/helpers/c/prng.c')
| -rw-r--r-- | tests/helpers/c/prng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/helpers/c/prng.c b/tests/helpers/c/prng.c index c72615475b..e4241aa44f 100644 --- a/tests/helpers/c/prng.c +++ b/tests/helpers/c/prng.c @@ -24,7 +24,7 @@ struct prng { struct prng *prng_new(unsigned long long seed) { - struct prng *rv = calloc(sizeof(*rv), 1); + struct prng *rv = calloc(1, sizeof(*rv)); assert(rv); rv->state = seed; |
