summaryrefslogtreecommitdiff
path: root/tests/helpers/c/prng.c
diff options
context:
space:
mode:
authorAriel Otilibili <ariel.otilibili@6wind.com>2025-01-06 15:45:30 +0100
committerAriel Otilibili <ariel.otilibili@6wind.com>2025-01-06 15:47:55 +0100
commit84d0ab9896f090ea21c9e3396c837058d50dd9ed (patch)
treee4729dfbc125aa268aa79f0025edf33d69463e26 /tests/helpers/c/prng.c
parent8ca4c3d0988c169ed41557727f45b69c8ce3aa0b (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.c2
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;