Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-27 22:17:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-27 22:17:19 +0400
commit0cb9a8311364edbc65fa207678341b88b986749d (patch)
tree5e22b7cfca599c3d9be1c055c99eb7215183dcbf /source/blender/blenlib/intern/fileops.c
parent684c4cc40d75b07c2b23cc8ee6f1798c95942e44 (diff)
code cleanup: remove unused code
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index af0359c0087..4809ba59aaf 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -911,18 +911,15 @@ void BLI_dir_create_recursive(const char *dirname)
char static_buf[MAXPATHLEN];
#endif
char *tmp;
- int needs_free;
if (BLI_exists(dirname)) return;
#ifdef MAXPATHLEN
size = MAXPATHLEN;
tmp = static_buf;
- needs_free = 0;
#else
size = strlen(dirname) + 1;
- tmp = MEM_callocN(size, "BLI_dir_create_recursive tmp");
- needs_free = 1;
+ tmp = MEM_callocN(size, __func__);
#endif
BLI_strncpy(tmp, dirname, size);
@@ -934,8 +931,9 @@ void BLI_dir_create_recursive(const char *dirname)
BLI_dir_create_recursive(tmp);
}
- if (needs_free)
- MEM_freeN(tmp);
+#ifndef MAXPATHLEN
+ MEM_freeN(tmp);
+#endif
mkdir(dirname, 0777);
}