winbindd: fix trust_is_oubound()
[samba.git] / source3 / winbindd / winbindd_misc.c
index 51c8799de327e2d995ddc815eda322fe23feb9c3..d2741cb6b6fc64084db8d066ea5d75086c57f01d 100644 (file)
@@ -60,20 +60,18 @@ static const char *get_trust_type_string(struct winbindd_tdc_domain *domain)
 
 static bool trust_is_inbound(struct winbindd_tdc_domain *domain)
 {
-       return (domain->trust_flags == 0x0) ||
-           ((domain->trust_flags & NETR_TRUST_FLAG_IN_FOREST) ==
-            NETR_TRUST_FLAG_IN_FOREST) ||                      
-           ((domain->trust_flags & NETR_TRUST_FLAG_INBOUND) ==
-           NETR_TRUST_FLAG_INBOUND);           
+       if (domain->trust_flags & NETR_TRUST_FLAG_INBOUND) {
+               return true;
+       }
+       return false;
 }
 
 static bool trust_is_outbound(struct winbindd_tdc_domain *domain)
 {
-       return (domain->trust_flags == 0x0) ||
-           ((domain->trust_flags & NETR_TRUST_FLAG_IN_FOREST) ==
-            NETR_TRUST_FLAG_IN_FOREST) ||                      
-           ((domain->trust_flags & NETR_TRUST_FLAG_OUTBOUND) ==
-           NETR_TRUST_FLAG_OUTBOUND);          
+       if (domain->trust_flags & NETR_TRUST_FLAG_OUTBOUND) {
+               return true;
+       }
+       return false;
 }
 
 static bool trust_is_transitive(struct winbindd_tdc_domain *domain)