Date: Tue, 14 Nov 1995 10:08:12 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: wollman@lcs.mit.edu (Garrett A. Wollman) Cc: phk@critter.tfs.com, current@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_sysctl.c Message-ID: <199511141708.KAA20157@phaeton.artisoft.com> In-Reply-To: <9511141616.AA23508@halloran-eldar.lcs.mit.edu> from "Garrett A. Wollman" at Nov 14, 95 11:16:03 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > I would rather it fail all the time and we can get the code fixed, > > than having a mismatch between expectations like this... > > I would prefer for it to obey the standard. > > Digital UNIX 3.2: > The gethostname() function retrieves the standard host name of the local > host. If sufficient space is provided, the returned address parameter is > null-terminated. So if you provide sufficient space, it *isn't* NULL terminated? How do you find the end of the thing then? I guess you have to call it with steadily decreasing space until you get a NULL. 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511141708.KAA20157>