Thread (39 messages) 39 messages, 2 authors, 2022-03-01
STALE1556d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]

[PATCH v2 01/11] object-file.c: split up declaration of unrelated variables

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2022-02-04 13:51:42
Subsystem: the rest · Maintainer: Linus Torvalds

Split up the declaration of the "ret" and "re_allocated"
variables. It's not our usual style to group variable declarations
simply because they share a type, we'd only prefer to do so when the
two are closely related (e.g. "int i, j"). This change makes a
subsequent and meaningful change's diff smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 object-file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/object-file.c b/object-file.c
index 8be57f48de7..ecc77973292 100644
--- a/object-file.c
+++ b/object-file.c
@@ -2118,7 +2118,8 @@ static int index_mem(struct index_state *istate,
 		     enum object_type type,
 		     const char *path, unsigned flags)
 {
-	int ret, re_allocated = 0;
+	int ret;
+	int re_allocated = 0;
 	int write_object = flags & HASH_WRITE_OBJECT;
 
 	if (!type)
-- 
2.35.1.940.ge7a5b4b05f2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help