diff options
author | Tomas Babej <tbabej@redhat.com> | 2014-04-16 17:28:34 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-04-23 13:16:35 +0200 |
commit | 91d68864d1b59cfc30fa68303f2f664d2e2368bf (patch) | |
tree | d454de060f1a5763e8c240befcef7e232d5a026b /daemons | |
parent | 6c8b40afb57ebd1b062b33db7a2639b9c112d8ed (diff) | |
download | freeipa-91d68864d1b59cfc30fa68303f2f664d2e2368bf.tar.gz freeipa-91d68864d1b59cfc30fa68303f2f664d2e2368bf.tar.xz freeipa-91d68864d1b59cfc30fa68303f2f664d2e2368bf.zip |
ipa_range_check: Fix typo when comparing strings using strcasecmp
Part of: https://fedorahosted.org/freeipa/ticket/4137
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c b/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c index e9f69674c..b55624912 100644 --- a/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c +++ b/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c @@ -387,10 +387,10 @@ static int check_ranges(struct range_info *r1, struct range_info *r2) /* Check if base range overlaps with existing base range. * Exception: ipa-ad-trust-posix ranges from the same forest */ - if (!(strcasecmp(r1->id_range_type, AD_TRUST_POSIX_RANGE_TYPE) && - strcasecmp(r2->id_range_type, AD_TRUST_POSIX_RANGE_TYPE) && - r1->forest_root_id != NULL && r2->forest_root_id !=NULL && - strcasecmp(r1->forest_root_id, r2->forest_root_id) == 0)) { + if (!((strcasecmp(r1->id_range_type, AD_TRUST_POSIX_RANGE_TYPE) == 0) && + (strcasecmp(r2->id_range_type, AD_TRUST_POSIX_RANGE_TYPE) == 0) && + (r1->forest_root_id != NULL && r2->forest_root_id != NULL) && + (strcasecmp(r1->forest_root_id, r2->forest_root_id) == 0))) { if (intervals_overlap(r1->base_id, r2->base_id, r1->id_range_size, r2->id_range_size)){ |