Donny9 commented on code in PR #8003:
URL: https://github.com/apache/nuttx/pull/8003#discussion_r1059403617
##########
include/string.h:
##########
@@ -35,8 +35,16 @@
****************************************************************************/
#define strcoll_l(s1, s2, l) strcoll(s1, s2)
+#define strdupa(x) strcpy(alloca(strlen(x) + 1), x)
#define strerror_l(e, l) strerror(e)
#define strxfrm_l(s1, s2, n, l) strxfrm(s1, s2, n)
+#define strndupa(x, len) ({ \
Review Comment:
keep, strndupa return alloca local memory, so using marco to do it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]