aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2015-01-23 15:23:52 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2015-01-27 01:33:31 +0100
commitd4d569d5614f4cbca2d816c60fde1a435ae6463a (patch)
treeae2c45d6eecd0348011644b9d491d0f844d8a167
parentbd7e007c6dd0e793f40c63b0078c07fe21c9abd9 (diff)
downloadrneovim-d4d569d5614f4cbca2d816c60fde1a435ae6463a.tar.gz
rneovim-d4d569d5614f4cbca2d816c60fde1a435ae6463a.tar.bz2
rneovim-d4d569d5614f4cbca2d816c60fde1a435ae6463a.zip
Remove nonnullret deadcode: getroom.
-rw-r--r--src/nvim/spell.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index 3753d9c85b..1d13a6abad 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -4545,11 +4545,9 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
// Turn flag "c" into COMPOUNDRULE compatible string "c+",
// "Na" into "Na+", "1234" into "1234+".
p = getroom(spin, STRLEN(items[1]) + 2, false);
- if (p != NULL) {
- STRCPY(p, items[1]);
- STRCAT(p, "+");
- compflags = p;
- }
+ STRCPY(p, items[1]);
+ STRCAT(p, "+");
+ compflags = p;
} else if (is_aff_rule(items, itemcnt, "COMPOUNDRULES", 2)) {
// We don't use the count, but do check that it's a number and
// not COMPOUNDRULE mistyped.
@@ -4565,14 +4563,12 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
if (compflags != NULL)
l += (int)STRLEN(compflags) + 1;
p = getroom(spin, l, false);
- if (p != NULL) {
- if (compflags != NULL) {
- STRCPY(p, compflags);
- STRCAT(p, "/");
- }
- STRCAT(p, items[1]);
- compflags = p;
+ if (compflags != NULL) {
+ STRCPY(p, compflags);
+ STRCAT(p, "/");
}
+ STRCAT(p, items[1]);
+ compflags = p;
}
} else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2)
&& compmax == 0) {
@@ -5199,8 +5195,6 @@ static void process_compflags(spellinfo_T *spin, afffile_T *aff, char_u *compfla
if (spin->si_compflags != NULL)
len += (int)STRLEN(spin->si_compflags) + 1;
p = getroom(spin, len, false);
- if (p == NULL)
- return;
if (spin->si_compflags != NULL) {
STRCPY(p, spin->si_compflags);
STRCAT(p, "/");