diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-30 21:47:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-30 21:47:24 (GMT) |
commit | 69102d9afb30ff314706eea8ebad3c5206be8739 (patch) | |
tree | 8895699adb69177d4cfaf05021e008216bfd8129 /unix/tclUnixChan.c | |
parent | 09ddbde6daf827df0d55d28bde43c60696f88506 (diff) | |
download | tcl-69102d9afb30ff314706eea8ebad3c5206be8739.zip tcl-69102d9afb30ff314706eea8ebad3c5206be8739.tar.gz tcl-69102d9afb30ff314706eea8ebad3c5206be8739.tar.bz2 |
missing goto
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r-- | unix/tclUnixChan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 132f690..fc2280a 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -1985,6 +1985,7 @@ Tcl_MakeFileChannel( if (isatty(fd)) { channelTypePtr = &ttyChannelType; snprintf(channelName, sizeof(channelName), "serial%d", fd); + goto final; } else #endif /* SUPPORTS_TTY */ if (TclOSfstat(fd, &buf) == 0 && S_ISSOCK(buf.st_mode)) { @@ -1998,10 +1999,10 @@ Tcl_MakeFileChannel( || sockaddr.sa_family == AF_INET6)) { return (Tcl_Channel)TclpMakeTcpClientChannelMode(INT2PTR(fd), mode); } - channelTypePtr = &fileChannelType; - snprintf(channelName, sizeof(channelName), "file%d", fd); } - + channelTypePtr = &fileChannelType; + snprintf(channelName, sizeof(channelName), "file%d", fd); +final: fsPtr = (TtyState *)ckalloc(sizeof(TtyState)); fsPtr->fileState.fd = fd; fsPtr->fileState.validMask = mode | TCL_EXCEPTION; |