diff options
author | Clint Adams <clint@users.sourceforge.net> | 2001-09-10 02:41:20 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2001-09-10 02:41:20 +0000 |
commit | cb0f8a08c7f8d95cdea766e8fd3726af49bef737 (patch) | |
tree | 53dbc7a0d312bd0052130059068cf96353b0ea12 /Src/Modules/tcp.c | |
parent | 41e0546a5800f95797ff0d3e72fb0faac525953f (diff) | |
download | zsh-cb0f8a08c7f8d95cdea766e8fd3726af49bef737.tar.gz zsh-cb0f8a08c7f8d95cdea766e8fd3726af49bef737.tar.xz zsh-cb0f8a08c7f8d95cdea766e8fd3726af49bef737.zip |
unposted: stupid -a bug
Diffstat (limited to 'Src/Modules/tcp.c')
-rw-r--r-- | Src/Modules/tcp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c index 884b2b25f..0a81ba9db 100644 --- a/Src/Modules/tcp.c +++ b/Src/Modules/tcp.c @@ -309,13 +309,12 @@ zts_byfd(int fd) tsess = zts_head(); - do { + while(tsess != NULL) { if (tsess->fd == fd) return tsess; tsess = zts_next(tsess); } - while(tsess != NULL); return NULL; } @@ -387,7 +386,7 @@ bin_ztcp(char *nam, char **args, char *ops, int func) char **addrp, *desthost, *localname, *remotename; struct hostent *zthost = NULL, *ztpeer = NULL; struct servent *srv; - Tcp_session sess; + Tcp_session sess = NULL; if (ops['f']) force = 1; @@ -502,7 +501,7 @@ bin_ztcp(char *nam, char **args, char *ops, int func) sess = zts_byfd(lfd); if (!sess) { - zwarnnam(nam, "fd is not registered as a tcp connection", NULL, 0); + zwarnnam(nam, "fd %s is not registered as a tcp connection", args[0], 0); return 1; } |