From 029ce2b6564c9a5ca990e582be1afad24d53a523 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 26 Apr 2023 18:56:24 +1000 Subject: [PATCH] Cleanup: remove redundant casts --- source/blender/makesrna/intern/rna_access.cc | 2 +- source/blender/python/intern/bpy_rna.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/makesrna/intern/rna_access.cc b/source/blender/makesrna/intern/rna_access.cc index b6962cabec1..c9c57eee4cd 100644 --- a/source/blender/makesrna/intern/rna_access.cc +++ b/source/blender/makesrna/intern/rna_access.cc @@ -4315,7 +4315,7 @@ int RNA_property_collection_lookup_string_index( found = 1; } - if ((char *)&name != nameptr) { + if (name != nameptr) { MEM_freeN(nameptr); } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index f76b78e9779..26d3b13d68d 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -2400,7 +2400,7 @@ static PyObject *pyrna_prop_collection_subscript_str(BPy_PropertyRNA *self, cons if ((keylen == namelen) && STREQ(nameptr, keyname)) { found = true; } - if ((char *)&name != nameptr) { + if (name != nameptr) { MEM_freeN(nameptr); } if (found) {