summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-01-19 14:59:56 +0100
committerBram Moolenaar <Bram@vim.org>2010-01-19 14:59:56 +0100
commit2660c0ea9be48b57b5b7f613fdd6add99c643c80 (patch)
tree4516eeafe1e08e8386f4b1260d3f15ea5bdea75c /src/fileio.c
parent3ea38ef23944f3d49c126b94708e2d4a540bca42 (diff)
downloadvim-git-2660c0ea9be48b57b5b7f613fdd6add99c643c80.tar.gz
updated for version 7.2.333v7.2.333
Problem: Warnings from static code analysis. Solution: Small changes to various lines. (Dominique Pelle)
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index bdc7439ce..0e2d1cca7 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7072,8 +7072,8 @@ vim_tempname(extra_char)
*/
for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i)
{
- size_t itmplen;
# ifndef HAVE_MKDTEMP
+ size_t itmplen;
long nr;
long off;
# endif
@@ -7091,7 +7091,6 @@ vim_tempname(extra_char)
else
# endif
add_pathsep(itmp);
- itmplen = STRLEN(itmp);
# ifdef HAVE_MKDTEMP
/* Leave room for filename */
@@ -7104,6 +7103,7 @@ vim_tempname(extra_char)
* otherwise it doesn't matter. The use of mkdir() avoids any
* security problems because of the predictable number. */
nr = (mch_get_pid() + (long)time(NULL)) % 1000000L;
+ itmplen = STRLEN(itmp);
/* Try up to 10000 different values until we find a name that
* doesn't exist. */