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>2010-10-31 18:39:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-10-31 18:39:37 +0300
commit3367ef8b6591b62b1b76f07fccb310485f6d45c7 (patch)
treecad394807148ecbd211b4deb1427e15eb9e34001 /source/blender/blenloader
parent4c80d13e54f5421774a992c1f1ff1c1ae832c2fc (diff)
initialize structs to zero rather then using memset().
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b50b1bcf57c..595781ac9bd 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -588,20 +588,16 @@ static void bh8_from_bh4(BHead *bhead, BHead4 *bhead4)
static BHeadN *get_bhead(FileData *fd)
{
- BHead8 bhead8;
- BHead4 bhead4;
- BHead bhead;
BHeadN *new_bhead = 0;
int readsize;
if (fd) {
if ( ! fd->eof) {
-
- /* not strictly needed but shuts valgrind up
+ /* initializing to zero isn't strictly needed but shuts valgrind up
* since uninitialized memory gets compared */
- memset(&bhead8, 0, sizeof(BHead8));
- memset(&bhead4, 0, sizeof(BHead4));
- memset(&bhead, 0, sizeof(BHead));
+ BHead8 bhead8= {0};
+ BHead4 bhead4= {0};
+ BHead bhead= {0};
// First read the bhead structure.
// Depending on the platform the file was written on this can