Commit 2dbd902
committed
SerialImp.c:RXTXPort(open) - avoid noop fcntl() and pointless assignments
The file is already opened with O_RDWR | O_NOCTTY | O_NONBLOCK.
* O_RDWR cannot be changed on linux with F_SETFL - https://man7.org/linux/man-pages/man2/F_GETFL.2const.html
* The last page lists explicitly what can be changed by F_SETFL and O_NOCTTY is not mentioned.
* O_NONBLOCK is already set when opening the file
* FD_CLOEXEC is supposed to be set with F_SETFD - https://man7.org/linux/man-pages/man2/F_SETFD.2const.html
* remove pointless assignments1 parent b1da316 commit 2dbd902
1 file changed
+2
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
717 | 716 | | |
718 | | - | |
| 717 | + | |
719 | 718 | | |
720 | 719 | | |
721 | 720 | | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
| 721 | + | |
727 | 722 | | |
728 | 723 | | |
729 | 724 | | |
| |||
0 commit comments