diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 08:20:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 08:20:44 +0300 |
commit | d286adc26e9d58475e5d7d83160999a25b6fc61f (patch) | |
tree | 50e987d3e31cae8fed709d1931c834095b411276 /source/blender | |
parent | 8a1d3bf2b1f9564d845c694ebf11268bbdfced97 (diff) |
Cleanup: remove redundant assignments & NULL pointer check
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 20 |
2 files changed, 8 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index d52e4443ac1..3b1230ce3b6 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -499,7 +499,6 @@ static void ccd_mesh_free(ccd_Mesh *ccdm) } MEM_freeN(ccdm->mima); MEM_freeN(ccdm); - ccdm = NULL; } } diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 24d051fecc8..f411566b623 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -990,18 +990,14 @@ static int colbalance_seq_cmp_fn(Sequence *seq, void *arg_pt) { SequenceSearchData *data = arg_pt; - if (seq->modifiers.first) { - SequenceModifierData *smd = seq->modifiers.first; - - for (smd = seq->modifiers.first; smd; smd = smd->next) { - if (smd->type == seqModifierType_ColorBalance) { - ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *)smd; - - if (&cbmd->color_balance == data->data) { - data->seq = seq; - data->smd = smd; - return -1; /* done so bail out */ - } + for (SequenceModifierData *smd = seq->modifiers.first; smd; smd = smd->next) { + if (smd->type == seqModifierType_ColorBalance) { + ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *)smd; + + if (&cbmd->color_balance == data->data) { + data->seq = seq; + data->smd = smd; + return -1; /* done so bail out */ } } } |