commit c17d47669ff12057f732f9ae3f69b22d52b4c6b5
parent 70bbb621b5bad33b03053264abc6deb0c6c5525e
Author: jvoisin <julien.voisin@dustri.org>
Date: Sun, 20 Aug 2023 19:33:35 +0200
Fix some sizeof-related typoes in the testsuite
Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/test_fread_overwrite_dynamic.c b/tests/test_fread_overwrite_dynamic.c
@@ -7,7 +7,7 @@
int main(int argc, char** argv) {
char buffer[12] = {0};
- assert(sizeof(buffer - 2) * argc > sizeof(buffer));
+ assert((sizeof(buffer) - 2) * argc > sizeof(*buffer));
CHK_FAIL_START
fread(buffer, sizeof(buffer) - 2, argc, NULL);
diff --git a/tests/test_fread_overwrite_static.c b/tests/test_fread_overwrite_static.c
@@ -7,7 +7,7 @@
int main(int argc, char** argv) {
char buffer[12] = {0};
- assert(sizeof(buffer - 2) * 10 > sizeof(buffer));
+ assert((sizeof(buffer) - 2) * 10 > sizeof(buffer));
CHK_FAIL_START
fread(buffer, sizeof(buffer) - 2, 10, NULL);
diff --git a/tests/test_fwrite_overwrite_dynamic.c b/tests/test_fwrite_overwrite_dynamic.c
@@ -7,7 +7,7 @@
int main(int argc, char** argv) {
char buffer[12] = {0};
- assert(sizeof(buffer - 2) * argc > sizeof(buffer));
+ assert((sizeof(buffer) - 2) * argc > sizeof(buffer));
CHK_FAIL_START
fwrite(buffer, sizeof(buffer) - 2, argc, NULL);
diff --git a/tests/test_fwrite_overwrite_static.c b/tests/test_fwrite_overwrite_static.c
@@ -7,7 +7,7 @@
int main(int argc, char** argv) {
char buffer[12] = {0};
- assert(sizeof(buffer - 2) * 10 > sizeof(buffer));
+ assert((sizeof(buffer) - 2) * 10 > sizeof(buffer));
CHK_FAIL_START
fwrite(buffer, sizeof(buffer) - 2, 10, NULL);