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 2022/06/13 17:58:28 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a diff in pull request #6423: sched/env: Fix the return value of unsetenv()

gustavonihei commented on code in PR #6423:
URL: https://github.com/apache/incubator-nuttx/pull/6423#discussion_r895991361


##########
sched/environ/env_unsetenv.c:
##########
@@ -61,23 +61,30 @@ int unsetenv(FAR const char *name)
 {
   FAR struct tcb_s *rtcb = this_task();
   FAR struct task_group_s *group = rtcb->group;
-  int ret = OK;
+  int idx;
 
-  DEBUGASSERT(name && group);
+  DEBUGASSERT(group);
+
+  /* Check the incoming parameter */
+
+  if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)

Review Comment:
   ```suggestion
     if (name == NULL || *name == '\0' || strchr(name, '=') != NULL)
   ```
   I believe that white space should not exist.



-- 
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-unsubscribe@nuttx.apache.org

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