pussuw commented on code in PR #15578:
URL: https://github.com/apache/nuttx/pull/15578#discussion_r1918241923


##########
libs/libc/misc/lib_tempbuffer.c:
##########
@@ -114,6 +114,7 @@ FAR char *lib_get_tempbuffer(size_t nbytes)
 #ifdef CONFIG_LIBC_TEMPBUFFER_MALLOC
   return lib_malloc(nbytes);
 #else
+  set_errno(ENOMEM);

Review Comment:
   If the library is accessed both by the kernel and user, it has typically 
been handled with something like this:
   
https://github.com/apache/nuttx/blob/118f8271038afe24732dfc4376fb63b72e039dba/include/nuttx/sched.h#L156-L180
   
   There are other examples as well. My point is, that previously we have 
preferred hiding the semantics behind pre-processor macros instead of adding 
excessive flagging into the code itself. I also prefer this style.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to