From owner-cvs-all Thu Mar 1 11:15:12 2001 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id C953537B719; Thu, 1 Mar 2001 11:15:01 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.2/8.11.2) with ESMTP id f21JFa471536; Thu, 1 Mar 2001 19:15:36 GMT (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f21Ewrx02627; Thu, 1 Mar 2001 14:58:53 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200103011458.f21Ewrx02627@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Warner Losh Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/usr.bin/calendar io.c In-Reply-To: Message from Warner Losh of "Wed, 28 Feb 2001 21:47:30 PST." <200103010547.f215lUw98788@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 01 Mar 2001 14:58:53 +0000 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ah good ! I've been looking for a reason to bring this up. Does anybody (Garrett, Bruce?) know definitively which of the various *LEN variables include NUL ? I think I know, but it's nice to pass it by people that may know better :) MAXHOSTNAMELEN: Man pages seem to say that this is the limit for a host name length, so it doesn't include the NUL, however sources such as dig call gethostname with a variable exactly MAXHOSTNAMELEN big, and expect the results to be NUL terminated. char hostname[] as declared in sys/kernel.h seems to be consistent with this, so I guess MAXHOSTNAMELEN does include space for a NUL. man pages such as gethostname(3) should be fixed. MAXNAMELEN: intro(2) suggests that this doesn't include space for a NUL - seems right. MAXPATHLEN intro(2) suggests that this does include space for a NUL - seems right. > imp 2001/02/28 21:47:30 PST > > Modified files: > usr.bin/calendar io.c > Log: > MAXPATHLEN includes the trailing NUL character, so there's no need to add 1 > to it for the size of path. > > Revision Changes Path > 1.14 +2 -2 src/usr.bin/calendar/io.c -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message