Date: Wed, 18 Sep 2002 20:41:35 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Nate Lawson <nate@root.org> Cc: arch@FreeBSD.ORG Subject: Re: Trivial mbuf patch for review. Message-ID: <5806.1032374495@critter.freebsd.dk> In-Reply-To: Your message of "Wed, 18 Sep 2002 11:26:51 PDT." <Pine.BSF.4.21.0209181119420.44463-100000@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.21.0209181119420.44463-100000@root.org>, 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5806.1032374495>