From da240e54c0eb8291396c0a7cc5d51041ace70004 Mon Sep 17 00:00:00 2001 From: michalbiesek <39981869+michalbiesek@users.noreply.github.com> Date: Thu, 11 Jul 2019 08:26:41 +0200 Subject: [PATCH] cc: extend cc_util module (#196) - cc_strnlen as wrapper for strnlen function --- include/cc_util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/cc_util.h b/include/cc_util.h index d9c13955b..f8a770059 100644 --- a/include/cc_util.h +++ b/include/cc_util.h @@ -86,6 +86,9 @@ extern "C" { #define cc_strlen(_s) \ strlen((char *)(_s)) +#define cc_strnlen(_s, _n) \ + strnlen((char *)(_s), (size_t)(_n)) + #define cc_strcmp(_s1, _s2) \ strcmp((char *)(_s1), (char *)(_s2))