diff options
Diffstat (limited to 'src/indent_c.c')
-rw-r--r-- | src/indent_c.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/indent_c.c b/src/indent_c.c index 10e463860a..08b28c73f2 100644 --- a/src/indent_c.c +++ b/src/indent_c.c @@ -122,18 +122,17 @@ int cin_is_cinword(char_u *line) cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1; cinw_buf = alloc((unsigned)cinw_len); - if (cinw_buf != NULL) { - line = skipwhite(line); - for (cinw = curbuf->b_p_cinw; *cinw; ) { - len = copy_option_part(&cinw, cinw_buf, cinw_len, ","); - if (STRNCMP(line, cinw_buf, len) == 0 - && (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1]))) { - retval = TRUE; - break; - } + line = skipwhite(line); + for (cinw = curbuf->b_p_cinw; *cinw; ) { + len = copy_option_part(&cinw, cinw_buf, cinw_len, ","); + if (STRNCMP(line, cinw_buf, len) == 0 + && (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1]))) { + retval = TRUE; + break; } - vim_free(cinw_buf); } + vim_free(cinw_buf); + return retval; } |