From 9b6f6642ee252a9bedbe267fd85376fc9359c74f Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 30 Jan 2024 15:29:55 -0500 Subject: update standard and safety checks --- src/string/strcat_s.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/string/strcat_s.c') diff --git a/src/string/strcat_s.c b/src/string/strcat_s.c index 7c820daf..40c474df 100644 --- a/src/string/strcat_s.c +++ b/src/string/strcat_s.c @@ -1,16 +1,15 @@ -#if 0 - #include +#include "_safety.h" /** concatenate strings **/ errno_t strcat_s(char * restrict s1, rsize_t s1max, const char * restrict s2) { - __C_EXT(1, 201112L); - __ASSERT_NONNULL(s1); - __ASSERT_NONNULL(s2); - __ASSERT_NOOVERLAP(s1, s2, strlen(s1) + strlen(s2)); + SIGNAL_SAFE(0); + ASSERT_NONNULL(s1); + ASSERT_NONNULL(s2); + ASSERT_NOOVERLAP(s1, s1max, s2, strlen(s2)); - return strncat(s1, s2, strlen(s2)); + return 0; } /*** @@ -29,6 +28,3 @@ null character of arg(s1). /* CEXT1(201112) */ - - -#endif -- cgit v1.2.1