changeset 14738:ef9f4be0bc5b v8.1.0381

patch 8.1.0381: variable declaration not at start of block commit https://github.com/vim/vim/commit/5c6f574bd1e07d6eab077fa8f28b2c0cd480b068 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 13 17:32:07 2018 +0200 patch 8.1.0381: variable declaration not at start of block Problem: Variable declaration not at start of block. Solution: Fix line ordering.
author Christian Brabandt <cb@256bit.org>
date Thu, 13 Sep 2018 17:45:05 +0200
parents a87b88a11db7
children bcc7ce3d8882
files src/version.c src/xdiff/xpatience.c
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    381,
+/**/
     380,
 /**/
     379,
--- a/src/xdiff/xpatience.c
+++ b/src/xdiff/xpatience.c
@@ -209,11 +209,6 @@ static struct entry *find_longest_common
 	struct entry **sequence = (struct entry **)xdl_malloc(map->nr * sizeof(struct entry *));
 	int longest = 0, i;
 	struct entry *entry;
-
-	/* Added to silence Coverity. */
-	if (sequence == NULL)
-		return map->first;
-
 	/*
 	 * If not -1, this entry in sequence must never be overridden.
 	 * Therefore, overriding entries before this has no effect, so
@@ -221,6 +216,10 @@ static struct entry *find_longest_common
 	 */
 	int anchor_i = -1;
 
+	/* Added to silence Coverity. */
+	if (sequence == NULL)
+		return map->first;
+
 	for (entry = map->first; entry; entry = entry->next) {
 		if (!entry->line2 || entry->line2 == NON_UNIQUE)
 			continue;