diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-08-02 09:08:03 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-08-02 09:08:03 +0000 |
commit | 56144a0548cf4cb76d8463e55d2edd40d00d6160 (patch) | |
tree | 6f66c12bd3d7ffd6fc82787298284b41855fb2fe /gdb/ser-tcp.c | |
parent | 97e730e1e2187d6b33f40f4316013583e54f94f1 (diff) | |
download | gdb-56144a0548cf4cb76d8463e55d2edd40d00d6160.tar.gz |
* MAINTAINERS: Add myself to the write-after-approval list.
* ser-tcp.c (tcp_open): Use `localhost' as default host if no
hostname is given.
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r-- | gdb/ser-tcp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index fe5cb4420b9..9a868e8df72 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -63,6 +63,9 @@ tcp_open (struct serial *scb, const char *name) hostname[tmp] = '\000'; /* Tie off host name */ port = atoi (port_str + 1); + if (!hostname[0]) + strcpy (hostname, "localhost"); + hostent = gethostbyname (hostname); if (!hostent) |