"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: const-ify got_gitconfig_get_* and other nitpicking
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 25 Sep 2021 12:27:11 +0200

Download raw body.

Thread
On Fri, Sep 24, 2021 at 11:33:32PM +0200, Omar Polo wrote:
> Hello,
> 
> Reading the code in libexec/ I saw a chance to "const-ify" the various
> got_gitconfig_get_* functions: they take a section and tag pointer that
> aren't modified AFAICS.  Through got-read-gitconfig.c they end up
> operating on string literals anyway.
> 
> While there I've also changed some variables to be size_t since they
> were used only in comparisons to other size_t and marked a couple of
> functions as static for coherence.
> 
> Cheers,
> 
> Omar Polo

Thank you, committed just now.
I've split your diff across a couple of commits.