Date: Mon, 17 Nov 2003 01:21:24 -0800 From: David Schultz <das@FreeBSD.ORG> To: Nate Lawson <nate@root.org> Cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sbin/nologin Makefile nologin.c nologin.sh Message-ID: <20031117092124.GA52046@VARK.homeunix.com> In-Reply-To: <20031116230357.K59017@root.org> References: <20031117064021.6223416A4E3@hub.freebsd.org> <20031116230357.K59017@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 16, 2003, Nate Lawson wrote: > On Sun, 16 Nov 2003, David Schultz wrote: > > +#define MESSAGE "This account is currently not available.\n" > > + > > +int > > +main(int argc, char *argv[]) > > +{ > > + > > + write(STDOUT_FILENO, MESSAGE, sizeof(MESSAGE)); > > + _exit(1); > > +} > > Shouldn't that be strlen(MESSAGE) since sizeof includes the terminating > '\0'? > > I couldn't help pointing out a bug in a variant of Hello World. ;-) Shhh! In an attempt to save face, I'm calling it a feature.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031117092124.GA52046>