tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: question about mbuf intialization
On Fri, 20 Sep 2013, Beverly Schwartz wrote:
>
> On Sep 19, 2013, at 4:21 PM, Christos Zoulas <christos%astron.com@localhost>
> wrote:
>
> > In article <546B8CEC-0675-463F-B5C8-6A0FD5541B83%bbn.com@localhost>,
> > Beverly Schwartz <bschwart%bbn.com@localhost> wrote:
> >>
> >> Any reason why we can't add
> >> m->m_len = 0;
> >> to m_get, and
> >> m->m_pkthdr.len = 0;
> >> to m_gethdr?
> >
> > Makes sense, but at the same time we should remove the superfluous zeroing
> > from the other places...
>
> A quick scan of the code shows that some of the time m_len is set to 0,
> but more of the time, the library using it just sets it to its ultimate
> value.
why does it seem useful to always set it to zero, if more often than not
it will be immediately set to another value..?
iain
Home |
Main Index |
Thread Index |
Old Index