summaryrefslogtreecommitdiff
path: root/contrib/tcl/unix/tclUnixSock.c
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
committerPaul Traina <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
commitf25b19db8d50748d4f75272ae324cad27788d9b3 (patch)
treecef0bba69f1833802f43364a0cde6945601e665a /contrib/tcl/unix/tclUnixSock.c
parent539e1e66ff6f99c987c8e03872ddaea5260db8f7 (diff)
Notes
Diffstat (limited to 'contrib/tcl/unix/tclUnixSock.c')
-rw-r--r--contrib/tcl/unix/tclUnixSock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/tcl/unix/tclUnixSock.c b/contrib/tcl/unix/tclUnixSock.c
index b917832ca8d52..c532993c19be4 100644
--- a/contrib/tcl/unix/tclUnixSock.c
+++ b/contrib/tcl/unix/tclUnixSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixSock.c 1.7 97/07/24 17:54:02
+ * SCCS: @(#) tclUnixSock.c 1.9 97/10/09 18:24:49
*/
#include "tcl.h"
@@ -47,11 +47,12 @@ static int hostnameInited = 0;
*
* Tcl_GetHostName --
*
- * Get the network name for this machine, in a system dependent way.
+ * Returns the name of the local host.
*
* Results:
* A string containing the network name for this machine, or
- * an empty string if we can't figure out the name.
+ * an empty string if we can't figure out the name. The caller
+ * must not modify or free this string.
*
* Side effects:
* None.
@@ -72,6 +73,7 @@ Tcl_GetHostName()
}
#ifndef NO_UNAME
+ (VOID *) memset((VOID *) &u, (int) 0, sizeof(struct utsname));
if (uname(&u) > -1) {
hp = gethostbyname(u.nodename);
if (hp != NULL) {