]> granicus.if.org Git - vim/commitdiff
patch 8.1.0381: variable declaration not at start of block v8.1.0381
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Sep 2018 15:32:07 +0000 (17:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Sep 2018 15:32:07 +0000 (17:32 +0200)
Problem:    Variable declaration not at start of block.
Solution:   Fix line ordering.

src/version.c
src/xdiff/xpatience.c

index 76fdb492a20be1cd9b732c155030ea84877acdfd..8addd2c36d37d8905b22e8bf276750f6f13882a2 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    381,
 /**/
     380,
 /**/
index 00af0ff11c1e5c9920897117411742d45f8aa65d..2c65aac386d6159610027280faf75c9e03fa797a 100644 (file)
@@ -209,11 +209,6 @@ static struct entry *find_longest_common_sequence(struct hashmap *map)
        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_sequence(struct hashmap *map)
         */
        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;