diff mbox series

[12/23] builtin/index-pack.c: Fix coding style

Message ID 20220430041406.164719-13-gitter.spiros@gmail.com (mailing list archive)
State New, archived
Headers show
Series add a new coccinelle semantic patch to enforce a | expand

Commit Message

Elia Pinto April 30, 2022, 4:13 a.m. UTC
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 <gitter.spiros@gmail.com>
---
 builtin/index-pack.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 680b66b063..3e385b4800 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1942,11 +1942,11 @@  int cmd_index_pack(int argc, const char **argv, const char *prefix)
 	free(objects);
 	strbuf_release(&index_name_buf);
 	strbuf_release(&rev_index_name_buf);
-	if (pack_name == NULL)
+	if (!pack_name)
 		free((void *) curr_pack);
-	if (index_name == NULL)
+	if (!index_name)
 		free((void *) curr_index);
-	if (rev_index_name == NULL)
+	if (!rev_index_name)
 		free((void *) curr_rev_index);
 
 	/*