summaryrefslogtreecommitdiff
path: root/diffcore-rotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'diffcore-rotate.c')
-rw-r--r--diffcore-rotate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diffcore-rotate.c b/diffcore-rotate.c
index 533986cf63..67b591261a 100644
--- a/diffcore-rotate.c
+++ b/diffcore-rotate.c
@@ -2,6 +2,7 @@
* Copyright (C) 2021, Google LLC.
* Based on diffcore-order.c, which is Copyright (C) 2005, Junio C Hamano
*/
+
#include "git-compat-util.h"
#include "gettext.h"
#include "diff.h"
@@ -10,7 +11,7 @@
void diffcore_rotate(struct diff_options *opt)
{
struct diff_queue_struct *q = &diff_queued_diff;
- struct diff_queue_struct outq;
+ struct diff_queue_struct outq = DIFF_QUEUE_INIT;
int rotate_to, i;
if (!q->nr)
@@ -31,7 +32,6 @@ void diffcore_rotate(struct diff_options *opt)
return;
}
- DIFF_QUEUE_CLEAR(&outq);
rotate_to = i;
for (i = rotate_to; i < q->nr; i++)