Skip to content

Commit eb76c8b

Browse files
SerialImp.c:RXTXPort(open): pointless assignments
1 parent b1da316 commit eb76c8b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/c/src/SerialImp.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,17 +713,16 @@ JNIEXPORT jint JNICALL RXTXPort(open)(
713713
See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details.
714714
*/
715715
#if defined(__linux__)
716-
int ret;
717716
//report_error("\nnative open(): Setting ownership flags");
718-
ret= fcntl(fd,F_SETOWN,getpid());
717+
fcntl(fd,F_SETOWN,getpid());
719718
//report_error( strerror(errno) );
720719

721720
//report_error("\nnativec(): Forcing unlock flags");
722-
ret = fcntl(fd,F_UNLCK);
721+
fcntl(fd,F_UNLCK);
723722
//report_error( strerror(errno) );
724723

725724
//report_error("\nnative open(): Setting read/write flags");
726-
ret= fcntl(fd,F_SETFL,O_CLOEXEC|O_RDWR|O_NONBLOCK);
725+
fcntl(fd,F_SETFL,O_CLOEXEC|O_RDWR|O_NONBLOCK);
727726
//report_error( strerror(errno) );
728727
#endif
729728
if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1))

0 commit comments

Comments
 (0)