You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/24 13:57:19 UTC

[GitHub] [incubator-nuttx] Donny9 commented on a change in pull request #2904: unistd/getcwd: enhance getcwd when buf is NULL

Donny9 commented on a change in pull request #2904:
URL: https://github.com/apache/incubator-nuttx/pull/2904#discussion_r581978696



##########
File path: libs/libc/unistd/lib_getcwd.c
##########
@@ -92,13 +98,18 @@ FAR char *getcwd(FAR char *buf, size_t size)
   /* Verify input parameters */
 
 #ifdef CONFIG_DEBUG_FEATURES
-  if (!buf || !size)
+  if (buf && !size)
     {
       set_errno(EINVAL);
       return NULL;
     }
 #endif
 
+  if (!size)

Review comment:
       Done!




----------------------------------------------------------------
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.

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