]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
addns: Remove unused dns_errstr()
authorVolker Lendecke <vl@samba.org>
Sat, 13 Jun 2026 10:45:42 +0000 (12:45 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 3 Jul 2026 08:08:36 +0000 (08:08 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/addns/dns.h
lib/addns/error.c [deleted file]
lib/addns/wscript_build

index 457b7b38a22c7af390932c757a83d12286150f18..f1c60d47fb798fd08e714c52135555c39c9b44ed 100644 (file)
@@ -183,6 +183,5 @@ DNS_ERROR dns_unmarshall_request(TALLOC_CTX *mem_ctx,
 struct dns_request *dns_update2request(struct dns_update_request *update);
 struct dns_update_request *dns_request2update(struct dns_request *request);
 uint16_t dns_response_code(uint16_t flags);
-const char *dns_errstr(DNS_ERROR err);
 
 #endif /* _DNS_H */
diff --git a/lib/addns/error.c b/lib/addns/error.c
deleted file mode 100644 (file)
index 361388c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-  Linux DNS client library implementation
-  Copyright (C) 2010 Guenther Deschner
-
-     ** NOTE! The following LGPL license applies to the libaddns
-     ** library. This does NOT imply that all of Samba is released
-     ** under the LGPL
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "dns.h"
-#include "dnserr.h"
-
-typedef struct {
-       const char *dns_errstr;
-       DNS_ERROR dns_errcode;
-} dns_err_code_struct;
-
-static const dns_err_code_struct dns_errs[] =
-{
-       { "ERROR_DNS_SUCCESS", ERROR_DNS_SUCCESS },
-       { "ERROR_DNS_RECORD_NOT_FOUND", ERROR_DNS_RECORD_NOT_FOUND },
-       { "ERROR_DNS_BAD_RESPONSE", ERROR_DNS_BAD_RESPONSE },
-       { "ERROR_DNS_INVALID_PARAMETER", ERROR_DNS_INVALID_PARAMETER },
-       { "ERROR_DNS_NO_MEMORY", ERROR_DNS_NO_MEMORY },
-       { "ERROR_DNS_INVALID_NAME_SERVER", ERROR_DNS_INVALID_NAME_SERVER },
-       { "ERROR_DNS_CONNECTION_FAILED", ERROR_DNS_CONNECTION_FAILED },
-       { "ERROR_DNS_GSS_ERROR", ERROR_DNS_GSS_ERROR },
-       { "ERROR_DNS_INVALID_NAME", ERROR_DNS_INVALID_NAME },
-       { "ERROR_DNS_INVALID_MESSAGE", ERROR_DNS_INVALID_MESSAGE },
-       { "ERROR_DNS_SOCKET_ERROR", ERROR_DNS_SOCKET_ERROR },
-       { "ERROR_DNS_UPDATE_FAILED", ERROR_DNS_UPDATE_FAILED },
-       { NULL, ERROR_DNS_SUCCESS },
-};
-
-const char *dns_errstr(DNS_ERROR err)
-{
-       int i;
-
-       for (i=0; dns_errs[i].dns_errstr != NULL; i++) {
-               if (ERR_DNS_EQUAL(err, dns_errs[i].dns_errcode)) {
-                       return dns_errs[i].dns_errstr;
-               }
-       }
-
-       return NULL;
-}
index 656c596191b7ab701c2aafcf4006c2a6cea2960b..662187f37ac985bb483c9d614fec93a2de6de2eb 100644 (file)
@@ -6,7 +6,6 @@ bld.SAMBA_LIBRARY('addns',
                        dnsrecord.c
                        dnssock.c
                        dnsmarshall.c
-                       error.c
                        dnsquery_srv.c
                    ''',
                    public_deps='samba-util gensec ndr resolv dns_lookup',