diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-11 22:50:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-11 22:50:07 +0300 |
commit | 5c8fc8e505fdfcd82e24dae75e7454b6f7d61530 (patch) | |
tree | e6101a8790effc2111985f20dc5ff73cbc443e89 /source/blender/editors/space_file/filelist.c | |
parent | 8c67b8ffe9fdab6698f20a39d5673b720e3d2756 (diff) |
Use const for direntry strings
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 4048c9fc1a1..3358812796e 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1252,8 +1252,9 @@ static void filelist_from_main(struct FileList *filelist) files->relname = BLI_strdup(id->name + 2); } else { - files->relname = MEM_mallocN(sizeof(*files->relname) * (FILE_MAX + (MAX_ID_NAME - 2)), __func__); - BLI_snprintf(files->relname, FILE_MAX + (MAX_ID_NAME - 2) + 3, "%s | %s", id->lib->name, id->name + 2); + char relname[FILE_MAX + (MAX_ID_NAME - 2) + 3]; + BLI_snprintf(relname, sizeof(relname), "%s | %s", id->lib->name, id->name + 2); + files->relname = BLI_strdup(relname); } files->type |= S_IFREG; #if 0 /* XXXXX TODO show the selection status of the objects */ |