[Bf-blender-cvs] [0a7c485b668] master: Cleanup: remove redundant memset on calloc'ed array

Campbell Barton noreply at git.blender.org
Sun Jan 15 13:55:48 CET 2023


Commit: 0a7c485b6681b046e5268f6901b4a10fc7189626
Author: Campbell Barton
Date:   Sun Jan 15 23:55:06 2023 +1100
Branches: master
https://developer.blender.org/rB0a7c485b6681b046e5268f6901b4a10fc7189626

Cleanup: remove redundant memset on calloc'ed array

===================================================================

M	source/blender/blenkernel/intern/softbody.c

===================================================================

diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 457b8de4592..0500e924d2f 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1529,7 +1529,6 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
   }
 
   sb_threads = MEM_callocN(sizeof(SB_thread_context) * totthread, "SBSpringsThread");
-  memset(sb_threads, 0, sizeof(SB_thread_context) * totthread);
   left = totsprings;
   dec = totsprings / totthread + 1;
   for (i = 0; i < totthread; i++) {
@@ -2208,7 +2207,6 @@ static void sb_cf_threads_run(Scene *scene,
   // printf("sb_cf_threads_run spawning %d threads\n", totthread);
 
   sb_threads = MEM_callocN(sizeof(SB_thread_context) * totthread, "SBThread");
-  memset(sb_threads, 0, sizeof(SB_thread_context) * totthread);
   left = totpoint;
   dec = totpoint / totthread + 1;
   for (i = 0; i < totthread; i++) {



More information about the Bf-blender-cvs mailing list