IDF release/v4.0 b0f053d82

This commit is contained in:
me-no-dev
2020-05-08 12:08:46 +00:00
parent c2da05050e
commit 8c8d8610f4
84 changed files with 235 additions and 492 deletions

View File

@ -228,6 +228,10 @@ char * ets_strdup(const char *s);
#ifndef os_memcmp
#define os_memcmp(s1, s2, n) memcmp((s1), (s2), (n))
#endif
#ifndef os_memcmp_const
#define os_memcmp_const(s1, s2, n) memcmp((s1), (s2), (n))
#endif
#ifndef os_strlen
#define os_strlen(s) strlen(s)
@ -274,6 +278,11 @@ char * ets_strdup(const char *s);
#endif
#endif
static inline int os_snprintf_error(size_t size, int res)
{
return res < 0 || (unsigned int) res >= size;
}
/**
* os_strlcpy - Copy a string with size bound and NUL-termination
* @dest: Destination