s3: simplify find_root_domain, find_our_domain() never fails
authorVolker Lendecke <vl@samba.org>
Wed, 30 Dec 2009 19:09:52 +0000 (20:09 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 2 Jan 2010 11:09:05 +0000 (12:09 +0100)
source3/winbindd/winbindd_util.c

index e5b0c06c1366280ae0d6a4ba1b99b461092b024b..3e03f4091c5aae1405a2284be76965a7ded94ce0 100644 (file)
@@ -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 );
 }