[PATCH v4 13/21] object-file.c: split up ternary in parse_loose_header()

From
Ævar Arnfjörð Bjarmason <hidden>
Date
2021-06-24 19:24:40
Reply to
Ævar Arnfjörð Bjarmason, 2021-06-24
This minor formatting change serves to make a subsequent patch easier
to read.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 object-file.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/object-file.c b/object-file.c
index ef3a1517fed..e51cf2ca33e 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1381,7 +1381,10 @@ int parse_loose_header(const char *hdr,
 	/*
 	 * The length must be followed by a zero byte
 	 */
-	return *hdr ? -1 : type;
+	if (*hdr)
+		return -1;
+
+	return type;
 }
 
 static int loose_object_info(struct repository *r,
-- 
2.32.0.606.g2e440ee2c94
Thread (232 messages) 232 messages, 10 authors, last reply 2021-11-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help