...
Compliant Code Example (TR24731-1)
Code Block | ||
---|---|---|
| ||
constraint/* * The abort_handler_t handle_errorss() { function writes /* define what to do whena message on the * standard error occurs */ stream then calls the abort(); } /*... function. */ set_constraint_handler(handleabort_handler_errorss); /*...*/ /* Returns zero on success */ errno_t function(char* dst1){ char src1[100] = "hello"; strcpy_s(dst1, sizeof(dst1), src1); /* sinceBecause handle_errors() never returns, we only get here if strcpy_s() succeeds. */ /* ... */ return 0; } |
...