[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    [PATCH 13/23] builtin/log.c: Fix coding style
From:       Elia Pinto <gitter.spiros () gmail ! com>
Date:       2022-04-30 4:13:56
Message-ID: 20220430041406.164719-14-gitter.spiros () gmail ! com
[Download RAW message or body]

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 --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;
-- 
2.35.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic