Commit b97d3fea authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Marko Mikulicic

strnlen should return size_t

    PUBLISHED_FROM=545c7d80380c48332803ef00981763b130a1c1c6
parent 2a4ca9d5
......@@ -921,7 +921,7 @@ int cs_base64_decode(const unsigned char *s, int len, char *dst) {
#if !(_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L) && \
!(__DARWIN_C_LEVEL >= 200809L) && !defined(RTOS_SDK) || \
defined(_WIN32)
int strnlen(const char *s, size_t maxlen) {
size_t strnlen(const char *s, size_t maxlen) {
size_t l = 0;
for (; l < maxlen && s[l] != '\0'; l++) {
}
......
......@@ -483,7 +483,7 @@ int c_vsnprintf(char *buf, size_t buf_size, const char *format, va_list ap);
#if !(_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L) && \
!(__DARWIN_C_LEVEL >= 200809L) && !defined(RTOS_SDK) || \
defined(_WIN32)
int strnlen(const char *s, size_t maxlen);
size_t strnlen(const char *s, size_t maxlen);
#endif
#ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment