Re: [PATCH 1/6] struct snapshot: store `start` rather than `header_len`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 24, 2018 at 12:14:11PM +0100, Michael Haggerty wrote:

> Store a pointer to the start of the actual references within the
> `packed-refs` contents rather than storing the length of the header.
> This is more convenient for most users of this field.

This makes sense. It means that the "start" pointer needs to be
invalidated if "buf" ever changes. But that was pretty much the case
already with "header_len" (because "buf" is not a heap buffer that we
might realloc; if it ever changes it is because we re-read the file, and
we would have to re-parse the header length anyway).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux