diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-06-16 20:27:25 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-16 20:27:25 -0400 |
commit | d199d18159c624844c9c8052d1a98b91084fb803 (patch) | |
tree | 827dd9c4f8f1f6ef73ff1f20a609d08e36640986 /src/nvim/syntax.c | |
parent | 8bbeb4b480a72d0099a18c4d8200313600045231 (diff) | |
parent | e85598e5a91c714c10034b6b3986a666065d1078 (diff) | |
download | rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.gz rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.bz2 rneovim-d199d18159c624844c9c8052d1a98b91084fb803.zip |
Merge #787 'removal of redundant OOM error handling'
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 6b4ab867f2..621c6f0d55 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -4399,10 +4399,6 @@ syn_cmd_region ( ++key_end; free(key); key = vim_strnsave_up(rest, (int)(key_end - rest)); - if (key == NULL) { /* out of memory */ - rest = NULL; - break; - } if (STRCMP(key, "MATCHGROUP") == 0) item = ITEM_MATCHGROUP; else if (STRCMP(key, "START") == 0) @@ -4692,12 +4688,8 @@ static void syn_combine_list(short **clstr1, short **clstr2, int list_op) */ static int syn_scl_name2id(char_u *name) { - char_u *name_u; - - /* Avoid using stricmp() too much, it's slow on some systems */ - name_u = vim_strsave_up(name); - if (name_u == NULL) - return 0; + // Avoid using stricmp() too much, it's slow on some systems + char_u *name_u = vim_strsave_up(name); int i; for (i = curwin->w_s->b_syn_clusters.ga_len; --i >= 0; ) { if (SYN_CLSTR(curwin->w_s)[i].scl_name_u != NULL |