From: Elia Pinto Date: Sat, 30 Apr 2022 04:13:45 GMT Subject: [PATCH 02/23] apply.c: Fix coding style Message-ID: <20220430041406.164719-3-gitter.spiros@gmail.com> In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index d19c26d332..2b7cd930ef 100644 --- a/apply.c +++ b/apply.c @@ -3274,11 +3274,11 @@ static struct patch *in_fn_table(struct apply_state *state, const char *name) { struct string_list_item *item; - if (name == NULL) + if (!name) return NULL; item = string_list_lookup(&state->fn_table, name); - if (item != NULL) + if (item) return (struct patch *)item->util; return NULL; @@ -3318,7 +3318,7 @@ static void add_to_fn_table(struct apply_state *state, struct patch *patch) * This should cover the cases for normal diffs, * file creations and copies */ - if (patch->new_name != NULL) { + if (patch->new_name) { item = string_list_insert(&state->fn_table, patch->new_name); item->util = patch; } -- 2.35.1