diff mbox series

[13/23] builtin/log.c: Fix coding style

Message ID 20220430041406.164719-14-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/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/log.c b/builtin/log.c
index c211d66d1d..d35419e489 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1012,7 +1012,7 @@  static int open_next_file(struct commit *commit, const char *subject,
 	if (!quiet)
 		printf("%s\n", filename.buf + outdir_offset);
 
-	if ((rev->diffopt.file = fopen(filename.buf, "w")) == NULL) {
+	if (!(rev->diffopt.file = fopen(filename.buf, "w"))) {
 		error_errno(_("cannot open patch file %s"), filename.buf);
 		strbuf_release(&filename);
 		return -1;