summaryrefslogtreecommitdiff
path: root/libmisc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libmisc/tests')
-rw-r--r--libmisc/tests/test_endian.c2
-rw-r--r--libmisc/tests/test_obj_nest.c4
-rw-r--r--libmisc/tests/test_rand.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/libmisc/tests/test_endian.c b/libmisc/tests/test_endian.c
index dcb3cc2..8c48727 100644
--- a/libmisc/tests/test_endian.c
+++ b/libmisc/tests/test_endian.c
@@ -11,7 +11,7 @@
#include "test.h"
int main() {
- uint8_t act[(2+4+8)*2] = {0};
+ uint8_t act[(2+4+8)*2] = {};
size_t pos = 0;
pos += uint16be_encode(&act[pos], UINT16_C(0x1234));
pos += uint32be_encode(&act[pos], UINT32_C(0x56789ABC));
diff --git a/libmisc/tests/test_obj_nest.c b/libmisc/tests/test_obj_nest.c
index bb9d6de..d5e563e 100644
--- a/libmisc/tests/test_obj_nest.c
+++ b/libmisc/tests/test_obj_nest.c
@@ -63,10 +63,10 @@ static ssize_t myclass_write(struct myclass *self, void *buf, size_t count) {
/* main test body *************************************************************/
int main() {
- struct myclass _obj = {0};
+ struct myclass _obj = {};
lo_interface read_writer obj = lo_box_myclass_as_read_writer(&_obj);
test_assert(LO_CALL(obj, write, "Hello", 6) == 6);
- char buf[6] = {0};
+ char buf[6] = {};
test_assert(LO_CALL(obj, read, buf, 3) == 3);
test_assert(memcmp(buf, "Hel\0\0\0", 6) == 0);
return 0;
diff --git a/libmisc/tests/test_rand.c b/libmisc/tests/test_rand.c
index 3596d94..ecb1c49 100644
--- a/libmisc/tests/test_rand.c
+++ b/libmisc/tests/test_rand.c
@@ -50,7 +50,7 @@ static void test_n(uint64_t cnt) {
#endif
} else {
double sum = 0;
- bool seen[MAX_SEE_ALL] = {0};
+ bool seen[MAX_SEE_ALL] = {};
for (int i = 0; i < ROUNDS; i++) {
uint64_t val = rand_uint63n(cnt);
sum += val;