Re: [PATCH v3 02/11] reftable: pass opts as constant pointer

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> We sometimes pass the refatble write options as value and sometimes as a
> pointer. This is quite confusing and makes the reader wonder whether the
> options get modified sometimes.
>
> In fact, `reftable_new_writer()` does cause the caller-provided options
> to get updated when some values aren't set up. This is quite unexpected,
> but didn't cause any harm until now.
>
> Adapt the code so that we do not modify the caller-provided values
> anymore. While at it, refactor the code to code to consistently pass the
> options as a constant pointer to clarify that the caller-provided opts
> will not ever get modified.
>

So from v2, we changed this from passing the value to passing the
address. Mostly, we're trying to stay consistent and have to pick
either, so this makes more sense since we're passing around big structs.

Attachment: signature.asc
Description: PGP signature


[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