From owner-freebsd-arch Wed Sep 18 11:41:48 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03CB237B401 for ; Wed, 18 Sep 2002 11:41:47 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 225B543E42 for ; Wed, 18 Sep 2002 11:41:46 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g8IIfZtF005807; Wed, 18 Sep 2002 20:41:44 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Nate Lawson Cc: arch@FreeBSD.ORG Subject: Re: Trivial mbuf patch for review. In-Reply-To: Your message of "Wed, 18 Sep 2002 11:26:51 PDT." Date: Wed, 18 Sep 2002 20:41:35 +0200 Message-ID: <5806.1032374495@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Nate Lawson wri tes: >On Wed, 18 Sep 2002, Poul-Henning Kamp wrote: >> This patch is a no-op which replaces local mbuf-chain counting >> loops with calls to m_length() and in one case m_fixhdr(). >> >> Index: kern/uipc_socket2.c >> =================================================================== >> RCS file: /home/ncvs/src/sys/kern/uipc_socket2.c,v >> retrieving revision 1.103 >> diff -u -r1.103 uipc_socket2.c >> --- kern/uipc_socket2.c 16 Aug 2002 18:41:48 -0000 1.103 >> +++ kern/uipc_socket2.c 18 Sep 2002 14:08:34 -0000 >> @@ -498,11 +498,11 @@ >> #ifdef SOCKBUF_DEBUG >> void >> sbcheck(sb) >> - register struct sockbuf *sb; >> + struct sockbuf *sb; >> { >> - register struct mbuf *m; >> - register struct mbuf *n = 0; >> - register u_long len = 0, mbcnt = 0; >> + struct mbuf *m; >> + struct mbuf *n = 0; >> + u_long len = 0, mbcnt = 0; >> >> for (m = sb->sb_mb; m; m = n) { >> n = m->m_nextpkt; > >Have we agreed to remove "register" from all our code or did you have a >specific reason for doing this here? Other places in the same patch you >leave register in after changing the line. I had to remove it from "n" in order to be able to &n, so I decided to remove it entirely from the function. >> + mrest_len = i = m_length(mrest, NULL); > >Is this initialization accepted style? Well, technically it's an assignment... Actually, "i" doesn't need the value, I'll fix that. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message