compiler.h: Add malloc_like? and realloc_like macro

and apply them to the related functions

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-12-18 09:47:12 -03:00
committed by Alan Carvalho de Assis
parent 6e66603da5
commit e1f45857e3
5 changed files with 56 additions and 20 deletions
+2 -2
View File
@@ -51,8 +51,8 @@ extern "C"
#define EXTERN extern
#endif
FAR char *strdup(FAR const char *s);
FAR char *strndup(FAR const char *s, size_t size);
FAR char *strdup(FAR const char *s) malloc_like;
FAR char *strndup(FAR const char *s, size_t size) malloc_like;
FAR char *strerror(int);
int strerror_r(int, FAR char *, size_t);
size_t strlen(FAR const char *);