git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] gc: remove unused launchctl_get_uid() call
Date: Thu, 09 Sep 2021 13:53:58 +0200	[thread overview]
Message-ID: <87bl52dkv1.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2109091222260.59@tvgsbejvaqbjf.bet>


On Thu, Sep 09 2021, Johannes Schindelin wrote:

> Hi Ævar,
>
> On Thu, 9 Sep 2021, Ævar Arnfjörð Bjarmason wrote:
>
>> When the launchctl_boot_plist() function was added in
>> a16eb6b1ff3 (maintenance: skip bootout/bootstrap when plist is
>> registered, 2021-08-24), an unused call to launchctl_get_uid() was
>> added along with it. That call appears to have been copy/pasted from
>> launchctl_boot_plist().
>>
>> Since we can remove that, we can also get rid of the "result"
>> variable, whose only purpose was allow for the free() between its
>> assignment and the return. That pattern also appears to have been
>> copy/pasted from launchctl_boot_plist().
>
> I don't find the most crucial information in that commit message: what is
> the fall-out of the removal of this call?
>
> Such an analysis (_with_ a summary of it in the commit message) is
> definitely required. And it should not be left as an exercise for the
> reader.

Do you mean an assurance to the reader that the removed code doesn't
have any side-effects? E.g. an addition of

    As the patch shows the returned value wasn't used at all in this
    function, the launchctl_get_uid() function itself just calls
    xstrfmt() and getuid(), neither of which have any subtle global
    side-effects, so this removal is safe.

?

  reply	other threads:[~2021-09-09 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 15:43 [PATCH 0/2] macos: safeguard git maintenance against highly concurrent operations Johannes Schindelin via GitGitGadget
2021-08-24 15:43 ` [PATCH 1/2] maintenance: create `launchctl` configuration using a lock file Johannes Schindelin via GitGitGadget
2021-08-24 15:44 ` [PATCH 2/2] maintenance: skip bootout/bootstrap when plist is registered Derrick Stolee via GitGitGadget
2021-09-09  1:25   ` [PATCH] gc: remove unused launchctl_get_uid() call Ævar Arnfjörð Bjarmason
2021-09-09 10:24     ` Johannes Schindelin
2021-09-09 11:53       ` Ævar Arnfjörð Bjarmason [this message]
2021-09-09 13:45         ` Johannes Schindelin
2021-09-09 18:13           ` Junio C Hamano
2021-09-12  0:24         ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2021-08-25  0:49 ` [PATCH 0/2] macos: safeguard git maintenance against highly concurrent operations Junio C Hamano
2021-08-25 12:23   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl52dkv1.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).