]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libnet: Simplify becomeDC
authorVolker Lendecke <vl@samba.org>
Fri, 25 Oct 2024 12:53:09 +0000 (14:53 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 11 Nov 2024 14:03:04 +0000 (14:03 +0000)
Checking for "" does not need a call to strcmp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/libnet/libnet_become_dc.c

index 968081fb0da87d86912803216e30d262d0a525ea..3e22586b22b1b4b2b1b23b1e29ff7d307efa6016 100644 (file)
@@ -821,7 +821,7 @@ static void becomeDC_recv_cldap(struct tevent_req *req)
        DEBUG(0,("CLDAP response: forest=%s dns=%s netbios=%s server_site=%s  client_site=%s\n",
                 s->forest.dns_name, s->domain.dns_name, s->domain.netbios_name,
                 s->source_dsa.site_name, s->dest_dsa.site_name));
-       if (!s->dest_dsa.site_name || strcmp(s->dest_dsa.site_name, "") == 0) {
+       if (!s->dest_dsa.site_name || (s->dest_dsa.site_name[0] == '\0')) {
                DEBUG(0,("Got empty client site - using server site name %s\n",
                         s->source_dsa.site_name));
                s->dest_dsa.site_name = s->source_dsa.site_name;