Re: [PATCH v5 01/10] daemon: libify socket setup and option functions
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Jan 12, 2023, 20:22 UTC
- Message-ID
- <2f40f8f7-7323-94ac-b423-9d35583f0dc3@github.com>
- In-Reply-To
- <e1b1a53b-69d7-6fd6-513d-0f6cb3751b51@github.com>
On 1/12/2023 2:35 PM, Victoria Dye wrote:
Show 17 quoted lines
> Matthew John Cheetham via GitGitGadget wrote:
>> From: Matthew John Cheetham <mjcheetham@outlook.com>
>>
>> Extract functions for setting up listening sockets and keep-alive options
>> from `daemon.c` to new `daemon-utils.{c,h}` files. Remove direct
>> dependencies on global state by inlining the behaviour at the callsites
>> for all libified functions.
>
> Thanks for making this change, the reduced code duplication should make the
> common daemon-related code more maintainable.
>
> For reference, I used
>
> 'git blame -s -b -C -C -C master..<this patch> -- daemon-utils.c'
>
> to help identify which lines in 'daemon-utils.c' were changed from their
> original implementation in 'daemon.c'.Neat trick! Thanks for sharing. Using --color-moved was giving similar results, but with a lot more tracking back-and-forth to see what the differences were.
I agree with your assessment on this patch that the differences are valid, safe, and desired.
Thanks, -Stolee