ns: fix p2_test_allocated unused variable ‘i’