From owner-cvs-all Fri Sep 20 8:41: 0 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDA3E37B401 for ; Fri, 20 Sep 2002 08:40:59 -0700 (PDT) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4992F43E42 for ; Fri, 20 Sep 2002 08:40:59 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 22497 invoked from network); 20 Sep 2002 15:41:04 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 20 Sep 2002 15:41:04 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8KFevBv069573; Fri, 20 Sep 2002 11:40:57 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200209201500.BAA25430@avalon.reed.wattle.id.au> Date: Fri, 20 Sep 2002 11:40:59 -0400 (EDT) From: John Baldwin To: Darren Reed Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 <>< 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