Loading...
tests/safe_allocation_src/ctor.allocate_zero.cpp xnu-12377.121.6 xnu-8019.41.5
--- xnu/xnu-12377.121.6/tests/safe_allocation_src/ctor.allocate_zero.cpp
+++ xnu/xnu-8019.41.5/tests/safe_allocation_src/ctor.allocate_zero.cpp
@@ -6,6 +6,7 @@
 #include <libkern/c++/safe_allocation.h>
 #include <darwintest.h>
 #include "test_utils.h"
+#include <algorithm>
 
 struct T {
 	int i;
@@ -24,13 +25,13 @@
 
 		auto const byteArray = reinterpret_cast<uint8_t const*>(array.data());
 		size_t const byteLength = array.size() * sizeof(T);
-		for (size_t i = 0; i != byteLength; ++i) {
-			CHECK(byteArray[i] == 0);
-		}
+		CHECK(std::all_of(byteArray, byteArray + byteLength, [](const auto& elem){
+			return elem == 0;
+		}));
 	}
 }
 
-T_DECL(ctor_allocate_zero, "safe_allocation.ctor.allocate_zero", T_META_TAG_VM_PREFERRED) {
+T_DECL(ctor_allocate_zero, "safe_allocation.ctor.allocate_zero") {
 	tests<T>();
 	tests<T const>();
 	tests<int>();