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/02/07 08:21:20 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5433: serial/pty: Reorder the register driver to simplify the error handling
xiaoxiang781216 commented on a change in pull request #5433:
URL: https://github.com/apache/incubator-nuttx/pull/5433#discussion_r800405434
##########
File path: drivers/serial/pty.c
##########
@@ -223,22 +223,22 @@ static void pty_destroy(FAR struct pty_devpair_s *devpair)
{
char devname[16];
- /* Un-register the slave device */
-
-#ifdef CONFIG_PSEUDOTERM_BSD
- snprintf(devname, 16, "/dev/ttyp%d", devpair->pp_minor);
-#else
- snprintf(devname, 16, "/dev/pts/%d", devpair->pp_minor);
-#endif
- unregister_driver(devname);
-
/* Un-register the master device (/dev/ptyN may have already been
* unlinked).
*/
snprintf(devname, 16, "/dev/pty%d", (int)devpair->pp_minor);
Review comment:
Done, remove the unnecessary cast.
--
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