Date: Fri, 20 Sep 2002 11:40:59 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Darren Reed <darrenr@reed.wattle.id.au> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c Message-ID: <XFMail.20020920114059.jhb@FreeBSD.org> In-Reply-To: <200209201500.BAA25430@avalon.reed.wattle.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On 20-Sep-2002 Darren Reed wrote: > btw, I think m_length() as a function which does something besides return > the length of an mbuf is wrong. I think that kind of task is better delt > with by keeping a pointer to the last mbuf in the chain. I'd recommend > that m_length() do what it suggests it do and have another one, m_lastbuf() > or something to do that job. Well, no, needing m_lastbuf() just sucks > bigtime. Some thought to making m_length() a M_LENGTH() might be an idea > too (that thought crossed my mind elsewhere), but that'd only fit well if > mbufs were fixed up with a tail pointer. FWIW, I agree with this. If the function name needs to be changed to make it more intuitive, so be it. There is nothing intuitive about a function named foo_length() not returning the length of 'foo'. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020920114059.jhb>