diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-12-08 13:11:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-12-08 13:11:21 +0100 |
commit | e980d8a934393c4da5ff0d5ece6f3e158fa98306 (patch) | |
tree | a54d79f0937f2d6d4a196615fc5f39f7330f1877 /src/misc2.c | |
parent | 005c3c27ee586126d7a40c41911cf600b9bbe3d1 (diff) | |
download | vim-git-e980d8a934393c4da5ff0d5ece6f3e158fa98306.tar.gz |
updated for version 7.3.076v7.3.076
Problem: Clang warnings for dead code.
Solution: Remove it. (Carlo Teubner)
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/misc2.c b/src/misc2.c index 2db4b663f..c6f4f112d 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -200,7 +200,6 @@ coladvance2(pos, addspaces, finetune, wcol) } #endif - idx = -1; ptr = line; while (col <= wcol && *ptr != NUL) { @@ -1223,7 +1222,7 @@ free_all_mem() #endif /* - * copy a string into newly allocated memory + * Copy "string" into newly allocated memory. */ char_u * vim_strsave(string) @@ -1239,6 +1238,12 @@ vim_strsave(string) return p; } +/* + * Copy up to "len" bytes of "string" into newly allocated memory and + * terminate with a NUL. + * The allocated memory always has size "len + 1", also when "string" is + * shorter. + */ char_u * vim_strnsave(string, len) char_u *string; |