From: Douglas Bagnall Date: Thu, 7 Feb 2019 00:39:09 +0000 (+1300) Subject: ldb_dn: remove unreachable code in dn_explode X-Git-Tag: ldb-1.6.1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4ebe006885e100da6797e210f9331fabffec8d4;p=thirdparty%2Fsamba.git ldb_dn: remove unreachable code in dn_explode Every time I look at this file, I spend a few minutes wondering how these bits of code are ever run. Never again. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c index 3bd655adbd5..f053e815ad4 100644 --- a/lib/ldb/common/ldb_dn.c +++ b/lib/ldb/common/ldb_dn.c @@ -359,9 +359,6 @@ static bool ldb_dn_explode(struct ldb_dn *dn) ex_name = d; in_ex_name = true; continue; - } else if (p[0] == '\0') { - p++; - continue; } else { in_extended = false; in_attr = true; @@ -474,12 +471,6 @@ static bool ldb_dn_explode(struct ldb_dn *dn) continue; } - if (trim && (*p != '=')) { - /* spaces/tabs are not allowed */ - ldb_dn_mark_invalid(dn); - goto failed; - } - if (*p == '=') { /* attribute terminated */ in_attr = false;