From 6baa834ebe710d73cfd54e465479a2b2de9d2476 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 17 Aug 2010 11:21:11 +1000 Subject: s4-ldb: use LDB_FLAG_MOD_TYPE() to extract element type from messages The flags field of message elements is part of a set of flags. We had LDB_FLAG_MOD_MASK for extracting the type, but it was only rarely being used (only 1 call used it correctly). This adds LDB_FLAG_MOD_MASK() to make it more obvious what is going on. This will allow us to use some of the other flags bits for internal markers on elements Pair-Programmed-With: Andrew Bartlett --- source4/lib/ldb/include/ldb.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index f3ec1ed606..6625d94dbd 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -109,6 +109,11 @@ struct ldb_dn; */ #define LDB_FLAG_MOD_MASK 0x3 +/** + use this to extract the mod type from the operation + */ +#define LDB_FLAG_MOD_TYPE(flags) ((flags) & LDB_FLAG_MOD_MASK) + /** Flag value used in ldap_modify() to indicate that attributes are being added. -- cgit