Hello,
Remove unused files rdlist.c and rdlist.h.
I noticed this cruft while preparing the previous patchset.
This patch is independent and applicable directly to master branch.
--
Petr^2 Spacek
From 274f5ea92866c50c77c59f6dabc64c3bdf162ace Mon Sep 17 00:00:00 2001
From: Petr Spacek pspa...@redhat.com
Date: Fri, 15 May 2015 11:41:02 +0200
Subject: [PATCH] Remove unused files rdlist.c and rdlist.h.
---
src/Makefile.am | 2 -
src/ldap_driver.c | 1 -
src/ldap_helper.c | 1 -
src/rdlist.c| 261
src/rdlist.h| 46 -
src/zone_register.c | 1 -
6 files changed, 312 deletions(-)
delete mode 100644 src/rdlist.c
delete mode 100644 src/rdlist.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 4cccabab285b43e9e76bd3cca0184d4d87941e8a..c5b01d796a14aa35bcf1317603e191d4cf882675 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,7 +14,6 @@ HDRS =\
lock.h \
log.h \
rbt_helper.h \
- rdlist.h \
semaphore.h \
settings.h \
syncrepl.h \
@@ -37,7 +36,6 @@ ldap_la_SOURCES = \
lock.c \
log.c \
rbt_helper.c \
- rdlist.c \
semaphore.c \
settings.c \
syncrepl.c \
diff --git a/src/ldap_driver.c b/src/ldap_driver.c
index 8b78c960cfb05cc0f4c0fb50e3fbdaa9cfdcae50..46729f9dad69ce7906693aaef845cbb1354248c5 100644
--- a/src/ldap_driver.c
+++ b/src/ldap_driver.c
@@ -51,7 +51,6 @@
#include ldap_helper.h
#include ldap_convert.h
#include log.h
-#include rdlist.h
#include util.h
#include zone_manager.h
diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 42efc8c0889e60636a1f7bed193b1b45eb279907..384d4c48bddb7dc613d477065e4ee17c2dbd7061 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -80,7 +80,6 @@
#include ldap_helper.h
#include lock.h
#include log.h
-#include rdlist.h
#include semaphore.h
#include settings.h
#include str.h
diff --git a/src/rdlist.c b/src/rdlist.c
deleted file mode 100644
index 08a2d80a821a717c0f3177941481e73b7bd9fc2f..
--- a/src/rdlist.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Authors: Adam Tkac at...@redhat.com
- * Martin Nagy mn...@redhat.com
- *
- * Copyright (C) 2009-2012 Red Hat
- * see file 'COPYING' for use and warranty information
- *
- * 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; version 2 or later
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include isc/mem.h
-#include isc/result.h
-#include isc/util.h
-#include isc/buffer.h
-#include isc/md5.h
-
-#include dns/rdata.h
-#include dns/rdatalist.h
-
-#include string.h
-#include stdlib.h
-
-#include ldap_helper.h /* TODO: Move things from ldap_helper here? */
-#include rdlist.h
-#include util.h
-
-
-/* useful only for RR sorting purposes */
-typedef struct rr_sort rr_sort_t;
-struct rr_sort {
- dns_rdatalist_t *rdatalist; /* contains RR class, type, TTL */
- isc_region_t rdatareg; /* handle to binary area with RR data */
-};
-
-static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
-rdata_clone(isc_mem_t *mctx, dns_rdata_t *source, dns_rdata_t **targetp)
-{
- isc_result_t result;
- dns_rdata_t *target = NULL;
- isc_region_t target_region, source_region;
-
- REQUIRE(source != NULL);
- REQUIRE(targetp != NULL *targetp == NULL);
-
- CHECKED_MEM_GET_PTR(mctx, target);
-
- dns_rdata_init(target);
-
- dns_rdata_toregion(source, source_region);
-
- CHECKED_MEM_GET(mctx, target_region.base, source_region.length);
-
- target_region.length = source_region.length;
- memcpy(target_region.base, source_region.base, source_region.length);
- dns_rdata_fromregion(target, source-rdclass, source-type,
- target_region);
-
- *targetp = target;
-
- return ISC_R_SUCCESS;
-
-cleanup:
- SAFE_MEM_PUT_PTR(mctx, target);
-
- return result;
-}
-
-isc_result_t
-rdatalist_clone(isc_mem_t *mctx, dns_rdatalist_t *source,
- dns_rdatalist_t **targetp)
-{
- dns_rdatalist_t *target;
- dns_rdata_t *source_rdata;
- dns_rdata_t *target_rdata;
- isc_result_t result;
-
- REQUIRE(source != NULL);
- REQUIRE(targetp != NULL *targetp == NULL);
-
- CHECKED_MEM_GET_PTR(mctx, target);
-
- dns_rdatalist_init(target);
- target-rdclass = source-rdclass;
- target-type = source-type;
- target-covers = source-covers;
- target-ttl = source-ttl;
-
- source_rdata = HEAD(source-rdata);
- while (source_rdata != NULL) {
- target_rdata = NULL;
- CHECK(rdata_clone(mctx, source_rdata, target_rdata));
- APPEND(target-rdata,