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/editors/animation/drivers.c
parent4c80d13e54f5421774a992c1f1ff1c1ae832c2fc (diff)
initialize structs to zero rather then using memset().
Diffstat (limited to 'source/blender/editors/animation/drivers.c')
-rw-r--r--source/blender/editors/animation/drivers.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 6ace48dd301..a6bdc8d36d4 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -364,14 +364,13 @@ short ANIM_paste_driver (ID *id, const char rna_path[], int array_index, short U
static int add_driver_button_exec (bContext *C, wmOperator *op)
{
- PointerRNA ptr;
+ PointerRNA ptr= {{0}};
PropertyRNA *prop= NULL;
char *path;
short success= 0;
int index, all= RNA_boolean_get(op->ptr, "all");
/* try to create driver using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
uiContextActiveProperty(C, &ptr, &prop, &index);
if (all)
@@ -421,14 +420,13 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot)
static int remove_driver_button_exec (bContext *C, wmOperator *op)
{
- PointerRNA ptr;
+ PointerRNA ptr= {{0}};
PropertyRNA *prop= NULL;
char *path;
short success= 0;
int index, all= RNA_boolean_get(op->ptr, "all");
/* try to find driver using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
uiContextActiveProperty(C, &ptr, &prop, &index);
if (all)
@@ -474,14 +472,13 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot)
static int copy_driver_button_exec (bContext *C, wmOperator *UNUSED(op))
{
- PointerRNA ptr;
+ PointerRNA ptr= {{0}};
PropertyRNA *prop= NULL;
char *path;
short success= 0;
int index;
/* try to create driver using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
@@ -520,14 +517,13 @@ void ANIM_OT_copy_driver_button (wmOperatorType *ot)
static int paste_driver_button_exec (bContext *C, wmOperator *UNUSED(op))
{
- PointerRNA ptr;
+ PointerRNA ptr= {{0}};
PropertyRNA *prop= NULL;
char *path;
short success= 0;
int index;
/* try to create driver using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {