/*------------------------------------------------------------------ * test_memset_s * * *------------------------------------------------------------------ */ #include "test_private.h" #include "safe_mem_lib.h" #define LEN ( 256 ) static uint8_t mem1[LEN]; int test_memset_s (void) { errno_t rc; uint32_t len; uint32_t i; uint8_t value; /*--------------------------------------------------*/ value = 34; rc = memset_s(NULL, LEN, value); if (rc != ESNULLP) { debug_printf("%s %u Error rc=%u \n", __FUNCTION__, __LINE__, rc); } /*--------------------------------------------------*/ value = 34; rc = memset_s(mem1, 0, value); if (rc != ESZEROL) { debug_printf("%s %u Error rc=%u \n", __FUNCTION__, __LINE__, rc); } /*--------------------------------------------------*/ for (i=0; i