[Bf-blender-cvs] [87b62839187] master: Cleanup: remove redundant NULL checks

Campbell Barton noreply at git.blender.org
Sun Mar 21 04:16:24 CET 2021


Commit: 87b62839187ef2077728985d0b6d3af02e628f0a
Author: Campbell Barton
Date:   Sun Mar 21 14:00:21 2021 +1100
Branches: master
https://developer.blender.org/rB87b62839187ef2077728985d0b6d3af02e628f0a

Cleanup: remove redundant NULL checks

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

M	source/blender/editors/gpencil/gpencil_sculpt_paint.c
M	source/blender/sequencer/intern/strip_add.c

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

diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 9666aca5254..2b8800e5136 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -1012,7 +1012,7 @@ static void gpencil_brush_clone_add(bContext *C, tGP_BrushEditData *gso)
 
       bGPDlayer *gpl = NULL;
       /* Try to use original layer. */
-      if (gps->runtime.tmp_layerinfo != NULL) {
+      if (gps->runtime.tmp_layerinfo[0] != '\0') {
         gpl = BKE_gpencil_layer_named_get(gpd, gps->runtime.tmp_layerinfo);
       }
 
diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c
index c4812228260..932b358cb37 100644
--- a/source/blender/sequencer/intern/strip_add.c
+++ b/source/blender/sequencer/intern/strip_add.c
@@ -105,7 +105,7 @@ static void seq_add_generic_update(Scene *scene, ListBase *seqbase, Sequence *se
 
 static void seq_add_set_name(Sequence *seq, SeqLoadData *load_data)
 {
-  if (load_data->name != NULL && load_data->name[0] != '\0') {
+  if (load_data->name[0] != '\0') {
     BLI_strncpy(seq->name + 2, load_data->name, sizeof(seq->name) - 2);
   }
   else {



More information about the Bf-blender-cvs mailing list