Commit 17e6b940ce7a23a18a072c53c0d0e47f14d4b035

Martin Mitas 2016-12-04T20:53:47

md_resolve_links: Minor cleanup.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 2fd2963..3e7cbb4 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -2735,7 +2735,7 @@ md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
         int closer_index = opener->next;
         MD_MARK* closer = &ctx->marks[closer_index];
         int next_index = opener->prev;
-        MD_MARK* next_opener = &ctx->marks[next_index];
+        MD_MARK* next_opener;
         MD_MARK* next_closer;
         MD_LINK_ATTR attr;
         int is_link = FALSE;
@@ -2745,6 +2745,7 @@ md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
             next_closer = &ctx->marks[next_opener->next];
         } else {
             next_opener = NULL;
+            next_closer = NULL;
         }
 
         /* If nested ("[ [ ] ]"), we need to make sure that: