Date: Sun, 24 Aug 2003 17:20:10 -0700 (PDT) From: Rui Lopes <rui@ruilopes.com> To: freebsd-doc@FreeBSD.org Subject: Re: docs/55805: a little correction to the arch-handbook Message-ID: <200308250020.h7P0KAgD055419@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/55805; it has been noted by GNATS. From: Rui Lopes <rui@ruilopes.com> To: Igor Ahmetov <ahmetov@rain.ifmo.ru> Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: docs/55805: a little correction to the arch-handbook Date: 25 Aug 2003 01:22:39 +0100 On S?, 2000-01-01 at 02:24, Igor Ahmetov wrote: [...] > >Description: > Looking into the example in section 13.4 of the arch-handbook (driverbasics/chapter.sgml), > we see a declaration: > typedef struct s_echo { > char msg[BUFFERSIZE]; > int len; > } t_echo; > > And later, in function echo_write, the following statement: > *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE)) = 0; > > So isn't it more correct to declare member msg of struct s_echo as char msg[BUFFERSIZE + 1]? Take a look at: http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/55445
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308250020.h7P0KAgD055419>