Thread (232 messages) flat view 232 messages, 10 authors, 2021-11-11
STALE1771d

Revision v6 of 6 in this series.

Revisions (6)
  1. v5 [diff vs current]
  2. v6 current
  3. v7 [diff vs current]
  4. v8 [diff vs current]
  5. v9 [diff vs current]
  6. v10 [diff vs current]

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

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-09-07 10:58:56
Subsystem: the rest · Maintainer: Linus Torvalds

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 2dd4cdd1ae0..7c6a865a6c0 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1404,7 +1404,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.33.0.815.g21c7aaf6073
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help