summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_util.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index e56efa4c8c..01440b678f 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -143,13 +143,14 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
}
}
- /* See if we found a match. Check if we need to update the
- SID. */
-
- if ( domain && sid) {
- if ( sid_equal( &domain->sid, &global_sid_NULL ) )
+ if (domain != NULL) {
+ /*
+ * We found a match. Possibly update the SID
+ */
+ if ((sid != NULL)
+ && sid_equal(&domain->sid, &global_sid_NULL)) {
sid_copy( &domain->sid, sid );
-
+ }
return domain;
}