From e1d50a6b24012b42f9987b439a4b94cd8db79999 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Thu, 27 Dec 2012 00:01:49 -0800 Subject: dsdb-operational: Avoid doing the ldb_attr_cmp if bypass flag is not set Most of the time this flag is not set and so we can avoid the strcasecmp in ldb_attr_cmp() Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Thu Jan 17 17:10:32 CET 2013 on sn-devel-104 --- source4/dsdb/samdb/ldb_modules/operational.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index c642ad8c92..b1122b3d42 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -612,7 +612,7 @@ struct op_controls_flags { }; static bool check_keep_control_for_attribute(struct op_controls_flags* controls_flags, const char* attr) { - if (ldb_attr_cmp(attr, "msDS-KeyVersionNumber") == 0 && controls_flags->bypassoperational) { + if (controls_flags->bypassoperational && ldb_attr_cmp(attr, "msDS-KeyVersionNumber") == 0 ) { return true; } return false; -- cgit