From 9116d77c6e422f62a9f54a72d9c4c418536010e5 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sun, 11 Feb 2007 18:42:52 +0000 Subject: [PATCH] In HOSTNAME primitive, move PRIMITIVE_RETURN outside the conditional, since we return whether we have sockets or not. --- v7/src/microcode/pruxenv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/pruxenv.c b/v7/src/microcode/pruxenv.c index 85657cd50..5e52acbae 100644 --- a/v7/src/microcode/pruxenv.c +++ b/v7/src/microcode/pruxenv.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pruxenv.c,v 1.25 2007/01/12 03:45:55 cph Exp $ +$Id: pruxenv.c,v 1.26 2007/02/11 18:42:52 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -203,10 +203,10 @@ DEFINE_PRIMITIVE ("HOSTNAME", Prim_hostname, 0, 0, #ifdef HAVE_SOCKETS STD_VOID_SYSTEM_CALL (syscall_gethostname, UX_gethostname (this_host_name, HOSTNAMESIZE)); - PRIMITIVE_RETURN (char_pointer_to_string (this_host_name)); #else strcpy (this_host_name, "unknown-host"); #endif + PRIMITIVE_RETURN (char_pointer_to_string (this_host_name)); } } -- 2.25.1