Commit 7db17442a6c9f1399065748b7d5b9fbcac203344

Anthony Green 2021-07-16T11:30:01

Don't check the whole buffer, just what we printed.

diff --git a/testsuite/libffi.closures/cls_double_va.c b/testsuite/libffi.closures/cls_double_va.c
index 6fc8dfb..c1e29ec 100644
--- a/testsuite/libffi.closures/cls_double_va.c
+++ b/testsuite/libffi.closures/cls_double_va.c
@@ -14,7 +14,7 @@
 static char buffer[BUF_SIZE];
 
 static void
-cls_double_va_fn(ffi_cif* cif __UNUSED__, void* resp, 
+cls_double_va_fn(ffi_cif* cif __UNUSED__, void* resp,
 		 void** args, void* userdata __UNUSED__)
 {
 	char*	format		= *(char**)args[0];
@@ -23,7 +23,7 @@ cls_double_va_fn(ffi_cif* cif __UNUSED__, void* resp,
 	*(ffi_arg*)resp = printf(format, doubleValue);
 	CHECK(*(ffi_arg*)resp == 4);
 	snprintf(buffer, BUF_SIZE, format, doubleValue);
-	CHECK(strncmp(buffer, "7.0\n", BUF_SIZE));
+	CHECK(strncmp(buffer, "7.0\n", 4));
 }
 
 int main (void)