Date: Wed, 20 Aug 2003 12:50:21 -0000 From: Igor Ahmetov <ahmetov@rain.ifmo.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/55805: a little correction to the arch-handbook Message-ID: <E124EDE-0000de-VA@localhost.my.domain> Resent-Message-ID: <200308201250.h7KCoJBB015133@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 55805 >Category: docs >Synopsis: a little correction to the arch-handbook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 20 05:50:18 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Igor Ahmetov >Release: FreeBSD 5.1-CURRENT i386 >Organization: >Environment: System: FreeBSD localhost.my.domain 5.1-CURRENT FreeBSD 5.1-CURRENT #4: Mon Aug 18 22:25:50 MSD 2003 root@localhost.my.domain:/usr/obj/usr/src/sys/CUSTOM i386 >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]? >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E124EDE-0000de-VA>