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/strnlen_s.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/string/strnlen_s.c') diff --git a/src/string/strnlen_s.c b/src/string/strnlen_s.c index f46ddcb2..3755f7d8 100644 --- a/src/string/strnlen_s.c +++ b/src/string/strnlen_s.c @@ -1,22 +1,13 @@ -#if 0 - #include +#include "_safety.h" size_t strnlen_s(const char *s, size_t maxsize) { - __C_EXT(1, 201112L); - size_t i = 0; - while (i < maxlen) { - if (s[i] == '\0') - return i; - i++; - } - return i; + SIGNAL_SAFE(0); + (void)s; + return maxsize; } /* CEXT1(201112) */ - - -#endif -- cgit v1.2.1