summaryrefslogtreecommitdiff
path: root/src/spell.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-09-29 18:32:52 +0200
committerBram Moolenaar <Bram@vim.org>2010-09-29 18:32:52 +0200
commita8fc79895ea3202fa96dc9f4084c74da85e3400d (patch)
tree709b9b363eea30f8acd440fc3467c2466e80b574 /src/spell.c
parent173c98550fa783cbc4d65cc6986b80a3e7459195 (diff)
downloadvim-git-a8fc79895ea3202fa96dc9f4084c74da85e3400d.tar.gz
updated for version 7.3.017v7.3.017
Problem: smatch reports errors. Solution: Fix the reported errors. (Dominique Pelle)
Diffstat (limited to 'src/spell.c')
-rw-r--r--src/spell.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/spell.c b/src/spell.c
index caffab6be..d34cc9459 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -4951,7 +4951,7 @@ typedef struct spellinfo_S
char_u *si_info; /* info text chars or NULL */
int si_region_count; /* number of regions supported (1 when there
are no regions) */
- char_u si_region_name[16]; /* region names; used only if
+ char_u si_region_name[17]; /* region names; used only if
* si_region_count > 1) */
garray_T si_rep; /* list of fromto_T entries from REP lines */
@@ -9530,7 +9530,8 @@ init_spellfile()
if (aspath)
/* Use directory of an entry with path, e.g., for
* "/dir/lg.utf-8.spl" use "/dir". */
- vim_strncpy(buf, curbuf->b_s.b_p_spl, lstart - curbuf->b_s.b_p_spl - 1);
+ vim_strncpy(buf, curbuf->b_s.b_p_spl,
+ lstart - curbuf->b_s.b_p_spl - 1);
else
/* Copy the path from 'runtimepath' to buf[]. */
copy_option_part(&rtp, buf, MAXPATHL, ",");
@@ -9539,13 +9540,14 @@ init_spellfile()
/* Use the first language name from 'spelllang' and the
* encoding used in the first loaded .spl file. */
if (aspath)
- vim_strncpy(buf, curbuf->b_s.b_p_spl, lend - curbuf->b_s.b_p_spl);
+ vim_strncpy(buf, curbuf->b_s.b_p_spl,
+ lend - curbuf->b_s.b_p_spl);
else
{
/* Create the "spell" directory if it doesn't exist yet. */
l = (int)STRLEN(buf);
vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell");
- if (!filewritable(buf) != 2)
+ if (filewritable(buf) != 2)
vim_mkdir(buf, 0755);
l = (int)STRLEN(buf);