Thread (5 messages) flat view 5 messages, 1 author, 2016-06-15
DORMANTno replies

Revision v1 of 7 in this series.

Revisions (7)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 current
  5. v1 [diff vs current]
  6. v1 [diff vs current]
  7. v1 [diff vs current]

[PATCH 3/4] unpack-trees: trivial cleanup

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:30
Subsystem: the rest · Maintainer: Linus Torvalds

dfc has not been initialized at this point.

Signed-off-by: Felipe Contreras <redacted>
---
 unpack-trees.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index ede4299..36f4ff7 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1040,8 +1040,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
 	if (!o->skip_sparse_checkout)
 		mark_new_skip_worktree(o->el, o->src_index, 0, CE_NEW_SKIP_WORKTREE);
 
-	if (!dfc)
-		dfc = xcalloc(1, cache_entry_size(0));
+	dfc = xcalloc(1, cache_entry_size(0));
 	o->df_conflict_entry = dfc;
 
 	if (len) {
-- 
1.8.3.rc3.312.g47657de
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help