r23779: Change from v2 or later to v3 or later.
[kai/samba.git] / source3 / nsswitch / winbindd_cm.c
index cea2ff844573959100515d4d4ad18b8e59738b46..4ab8bd3f05b3d2bc106d3d4dca15f929108ac538 100644 (file)
@@ -11,7 +11,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -258,9 +258,7 @@ static void check_domain_online_handler(struct event_context *ctx,
                  "%s (online = %s)\n", domain->name, 
                  domain->online ? "True" : "False" ));
 
-       if (domain->check_online_event) {
-               TALLOC_FREE(domain->check_online_event);
-       }
+       TALLOC_FREE(domain->check_online_event);
 
        /* Are we still in "startup" mode ? */
 
@@ -312,9 +310,7 @@ void set_domain_offline(struct winbindd_domain *domain)
        DEBUG(10,("set_domain_offline: called for domain %s\n",
                domain->name ));
 
-       if (domain->check_online_event) {
-               TALLOC_FREE(domain->check_online_event);
-       }
+       TALLOC_FREE(domain->check_online_event);
 
        if (domain->internal) {
                DEBUG(3,("set_domain_offline: domain %s is internal - logic error.\n",
@@ -353,7 +349,7 @@ void set_domain_offline(struct winbindd_domain *domain)
 
        /* The above *has* to succeed for winbindd to work. */
        if (!domain->check_online_event) {
-               smb_panic("set_domain_offline: failed to add online handler.\n");
+               smb_panic("set_domain_offline: failed to add online handler");
        }
 
        DEBUG(10,("set_domain_offline: added event handler for domain %s\n",
@@ -426,9 +422,7 @@ static void set_domain_online(struct winbindd_domain *domain)
 
        /* Ensure we have no online timeout checks. */
        domain->check_online_timeout = 0;
-       if (domain->check_online_event) {
-               TALLOC_FREE(domain->check_online_event);
-       }
+       TALLOC_FREE(domain->check_online_event);
 
        /* Ensure we ignore any pending child messages. */
        messaging_deregister(winbind_messaging_context(),
@@ -496,7 +490,7 @@ void set_domain_online_request(struct winbindd_domain *domain)
 
                /* The above *has* to succeed for winbindd to work. */
                if (!domain->check_online_event) {
-                       smb_panic("set_domain_online_request: failed to add online handler.\n");
+                       smb_panic("set_domain_online_request: failed to add online handler");
                }
        }