summaryrefslogtreecommitdiff
path: root/lib/talloc
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-07-07 12:34:37 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-07-22 22:20:25 +0000
commitac23eeb41c3d27d710722f94e22dd84410d183d3 (patch)
tree94d74802f74788cfa3d8eafcdb4af303447b6330 /lib/talloc
parentdc20e7c6df7a230c3b3cd9ae7de79e4cacc36eb4 (diff)
downloadsamba-ac23eeb41c3d27d710722f94e22dd84410d183d3.tar.gz
talloc/py_util: remove tautologically dead code
Being careful is good and all, but if we don't trust the static PyTypeObject *type = NULL; two lines up, we need to reconsider our entire software universe. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/talloc')
-rw-r--r--lib/talloc/pytalloc_util.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/talloc/pytalloc_util.c b/lib/talloc/pytalloc_util.c
index 4193ca895ce..c1a41e958d4 100644
--- a/lib/talloc/pytalloc_util.c
+++ b/lib/talloc/pytalloc_util.c
@@ -32,10 +32,6 @@ _PUBLIC_ PyTypeObject *pytalloc_GetObjectType(void)
static PyTypeObject *type = NULL;
PyObject *mod;
- if (type != NULL) {
- return type;
- }
-
mod = PyImport_ImportModule("talloc");
if (mod == NULL) {
return NULL;
@@ -52,10 +48,6 @@ _PUBLIC_ PyTypeObject *pytalloc_GetBaseObjectType(void)
static PyTypeObject *type = NULL;
PyObject *mod;
- if (type != NULL) {
- return type;
- }
-
mod = PyImport_ImportModule("talloc");
if (mod == NULL) {
return NULL;
@@ -72,10 +64,6 @@ static PyTypeObject *pytalloc_GetGenericObjectType(void)
static PyTypeObject *type = NULL;
PyObject *mod;
- if (type != NULL) {
- return type;
- }
-
mod = PyImport_ImportModule("talloc");
if (mod == NULL) {
return NULL;