summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_id.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-11-28 03:24:58 +0000
committerJakub Hrozek <jhrozek@redhat.com>2012-12-04 12:58:22 +0100
commite11c7dc43f4ff9897e37cc0d793f8e1fb3b8453a (patch)
treea58bc8619ce98a8231e436e281f81daf43142ebb /src/providers/ipa/ipa_id.c
parent6ff0d2242fe93d694b81b29ab12289db4859e1dc (diff)
downloadsssd-e11c7dc43f4ff9897e37cc0d793f8e1fb3b8453a.tar.gz
sssd-e11c7dc43f4ff9897e37cc0d793f8e1fb3b8453a.tar.xz
sssd-e11c7dc43f4ff9897e37cc0d793f8e1fb3b8453a.zip
Use an entry type mask macro to filter entry types
Avoids hardcoding magic numbers everywhere and self documents why a mask is being applied.
Diffstat (limited to 'src/providers/ipa/ipa_id.c')
-rw-r--r--src/providers/ipa/ipa_id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index 6b3e40ef3..afe0a636d 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -84,7 +84,7 @@ void ipa_account_info_handler(struct be_req *breq)
/* if domain names do not match, this is a subdomain case */
req = ipa_get_subdom_acct_send(breq, breq->be_ctx->ev, ctx, ar);
- } else if ((ar->entry_type & 0xFFF) == BE_REQ_NETGROUP) {
+ } else if ((ar->entry_type & BE_REQ_TYPE_MASK) == BE_REQ_NETGROUP) {
/* netgroups are handled by a separate request function */
if (ar->filter_type != BE_FILTER_NAME) {
return sdap_handler_done(breq, DP_ERR_FATAL,
@@ -113,7 +113,7 @@ static void ipa_account_info_done(struct tevent_req *req)
const char *error_text;
int ret, dp_error;
- if ((ar->entry_type & 0xFFF) == BE_REQ_NETGROUP) {
+ if ((ar->entry_type & BE_REQ_TYPE_MASK) == BE_REQ_NETGROUP) {
ret = ipa_id_get_netgroup_recv(req, &dp_error);
} else {
ret = ipa_get_subdom_acct_recv(req, &dp_error);