[PATCH 04/23] blame.c: Fix coding style
- From
Elia Pinto <gitter.spiros@gmail.com>
- Date
- Apr 30, 2022, 04:13 UTC
- Message-ID
- <20220430041406.164719-5-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 <gitter.spiros@gmail.com> --- blame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blame.c b/blame.c index 186ad96120..da1052ac94 100644 --- a/blame.c +++ b/blame.c @@ -1072,7 +1072,7 @@ static struct blame_entry *blame_merge(struct blame_entry *list1, if (p1->s_lno <= p2->s_lno) { do { tail = &p1->next; - if ((p1 = *tail) == NULL) { + if (!(p1 = *tail)) { *tail = p2; return list1; } @@ -1082,7 +1082,7 @@ static struct blame_entry *blame_merge(struct blame_entry *list1, *tail = p2; do { tail = &p2->next; - if ((p2 = *tail) == NULL) { + if (!(p2 = *tail)) { *tail = p1; return list1; } @@ -1090,7 +1090,7 @@ static struct blame_entry *blame_merge(struct blame_entry *list1, *tail = p1; do { tail = &p1->next; - if ((p1 = *tail) == NULL) { + if (!(p1 = *tail)) { *tail = p2; return list1; }
-- 2.35.1