From ac23eeb41c3d27d710722f94e22dd84410d183d3 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sun, 7 Jul 2019 12:34:37 +1200 Subject: 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 Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- lib/talloc/pytalloc_util.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/talloc') 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; -- cgit v1.2.1