summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-30 20:09:52 +0100
committerVolker Lendecke <vl@samba.org>2010-01-02 12:09:05 +0100
commita66341b993c74c6db1c064bd48ff52acb704d9c9 (patch)
treee6ff0fdd6c16cc432ce1a2e9448cd8442ece033f
parent133f023d58de8106d41d59dfc3c22e63a5653701 (diff)
downloadsamba-a66341b993c74c6db1c064bd48ff52acb704d9c9.tar.gz
samba-a66341b993c74c6db1c064bd48ff52acb704d9c9.tar.bz2
samba-a66341b993c74c6db1c064bd48ff52acb704d9c9.zip
s3: simplify find_root_domain, find_our_domain() never fails
-rw-r--r--source3/winbindd/winbindd_util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index e5b0c06c13..3e03f4091c 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -799,11 +799,9 @@ struct winbindd_domain *find_root_domain(void)
{
struct winbindd_domain *ours = find_our_domain();
- if ( !ours )
- return NULL;
-
- if ( strlen(ours->forest_name) == 0 )
+ if (ours->forest_name[0] == '\0') {
return NULL;
+ }
return find_domain_from_name( ours->forest_name );
}