[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH 7/9] reftable/merged: refactor seeking of records
From: Eric Sunshine <sunshine () sunshineco ! com>
Date: 2024-01-31 17:55:22
Message-ID: CAPig+cTZcxiZUPgjqEzMNG72X4fwnNT_DwjTj5cQh5zEpiN2Hw () mail ! gmail ! com
[Download RAW message or body]
On Wed, Jan 31, 2024 at 3:02 AM Patrick Steinhardt <ps@pks.im> wrote:
> The code to seek reftable records in the merged table code is quite hard
> to read and does not conform to our coding style in multiple ways:
>
> - We have multiple exit paths where we release resources even though
> that is not really necessary
s/$/./
> - We use a scoped error variable `e` which is hard to reason about.
> This variable is not required at all.
>
> - We allocate memory in the variable declarations, which is easy to
> miss.
>
> Refactor the function so that it becomes more maintainable in the
> future.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic