docs/55805: a little correction to the arch-handbook

Igor Ahmetov ahmetov at rain.ifmo.ru
Wed Aug 20 12:50:21 UTC 2003


>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 at 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:



More information about the freebsd-doc mailing list