From owner-freebsd-doc@FreeBSD.ORG Sun Aug 24 17:20:11 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 495BF16A4BF for ; Sun, 24 Aug 2003 17:20:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E60C343FCB for ; Sun, 24 Aug 2003 17:20:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7P0KAUp055420 for ; Sun, 24 Aug 2003 17:20:10 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7P0KAgD055419; Sun, 24 Aug 2003 17:20:10 -0700 (PDT) Date: Sun, 24 Aug 2003 17:20:10 -0700 (PDT) Message-Id: <200308250020.h7P0KAgD055419@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Rui Lopes Subject: Re: docs/55805: a little correction to the arch-handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Rui Lopes List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2003 00:20:11 -0000 The following reply was made to PR docs/55805; it has been noted by GNATS. From: Rui Lopes To: Igor Ahmetov 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