Re: [PATCH 1/3] revision: clarify a 'return NULL' in get_reference()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 1, 2024, 14:53 UTC
- Message-ID
- <CAPig+cSNM0VJZ5SpvazY5T6rFvXuoTdfgD5J5f36PW4iW7xLVA@mail.gmail.com>
- In-Reply-To
- <20240201115809.1177064-2-christian.couder@gmail.com>
On Thu, Feb 1, 2024 at 6:58 AM Christian Couder <christian.couder@gmail.com> wrote:
> In general when we know a pointer variable is NULL, it's clearer to > explicitely return NULL than to return that variable.
s/explicitely/explicitly/
Show 6 quoted lines
> In get_reference() when 'object' is NULL, we already return NULL > when 'revs->exclude_promisor_objects && is_promisor_object(oid)' is > true, but we return 'object' when 'revs->ignore_missing' is true. > > Let's make the code clearer and more uniform by also explicitely > returning NULL when 'revs->ignore_missing' is true.
s/explicitely/explicitly/
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>