mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 15:40:23 +08:00
strnlen should return size_t
PUBLISHED_FROM=545c7d80380c48332803ef00981763b130a1c1c6
This commit is contained in:
parent
2a4ca9d5c3
commit
b97d3fea4b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user