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/12/12 06:16:55 UTC

[GitHub] [incubator-nuttx] pkarashchenko edited a comment on pull request #4978: libc: Add getprogname function

pkarashchenko edited a comment on pull request #4978:
URL: https://github.com/apache/incubator-nuttx/pull/4978#issuecomment-991841572


   > > In general current approach seems to be fine, but most probably adding `setprogname` will require adding additional field into `struct task_info_s`.
   > > 
   > 
   > setprogname is normally used by glibc internally, to initialize the program name. But the program name is initialized automatically in NuttX, so setprogname isn't really needed here.
   > 
   > > BWT, maybe you can also fix a small bug in `gettextdomain` implementation by changing `#ifdef CONFIG_BUILD_KERNEL` to `#ifndef CONFIG_BUILD_KERNEL`. I just found it today during the code review.
   > 
   > Fixed here: https://github.com/apache/incubator-nuttx/pull/4982
   
   So we do not need neither `DEBUGASSERT(info != NULL);`, nor `return info->argv && info->argv[0] ? info->argv[0] : "?";` and assume that task info always exists and `argv` can't be `NULL` and `argv[0]` is not empty?
   
   If yes, then probably need to remove `task_get_info()` null checks in other files.


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