From 349b9b72ec36194a1275eaa42ca145071256b623 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 4 Mar 2011 10:44:22 +0100 Subject: s4:dsdb - we don't need to check if a DN != NULL if we call "ldb_dn_validate" "ldb_dn_validate" is NULL-safe and does the check implicitly. Reviewed by: Tridge --- source4/lib/ldb/pyldb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index c1962e612f..d14487ba02 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -553,8 +553,7 @@ static PyObject *py_ldb_dn_new(PyTypeObject *type, PyObject *args, PyObject *kwa } ret = ldb_dn_new(mem_ctx, ldb_ctx, str); - - if (ret == NULL || !ldb_dn_validate(ret)) { + if (!ldb_dn_validate(ret)) { talloc_free(mem_ctx); PyErr_SetString(PyExc_ValueError, "unable to parse dn string"); return NULL; -- cgit