On Fri, Oct 30, 2020 at 11:20 PM Daniel Gustafsson <daniel@yesql.se> wrote:
>
> > On 30 Oct 2020, at 00:40, Andres Freund <andres@anarazel.de> wrote:
>
> > There's quite a few copies of this code that look exactly the same,
> > except for the be_tls_get_* call. Do you see a way to have fewer copies
> > of the same code?
>
> There's really only two of the same, and two sets of those. I tried some
> variations but didn't really achieve anything that would strike the right
> balance on the codegolf-to-readability scale. Maybe others have a richer
> imagination than me.
Yeah, since it's only 2 of each, moving it to a macro wouldn't really
save a lot -- and it would make things less readable overall I think.
So I'd say the current version is OK.
One thing I noted was in the docs part of the patch there is a missing
comma -- but that one is missing previously as well. I'll go apply
that fix to the back branches while waiting to see if somebody comes
up with a more creative way to avoid the repeated code :)
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/