summaryrefslogtreecommitdiff
path: root/usr.bin/dig/lib
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2024-08-14 17:36:49 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2024-08-14 17:36:49 +0000
commitf934d049ca2a30cae9d2a31d0cc6a3703c849946 (patch)
treec6214bfd366e11464ef8366a79fdf567e93d2dec /usr.bin/dig/lib
parent7908c8143941047bbabc7e981a970f923c9f8ba9 (diff)
lwserver is unused, whatever that is / was.
Diffstat (limited to 'usr.bin/dig/lib')
-rw-r--r--usr.bin/dig/lib/lwres/include/lwres/lwres.h6
-rw-r--r--usr.bin/dig/lib/lwres/lwconfig.c32
2 files changed, 1 insertions, 37 deletions
diff --git a/usr.bin/dig/lib/lwres/include/lwres/lwres.h b/usr.bin/dig/lib/lwres/include/lwres/lwres.h
index 74e49211662..b8029eb6fc4 100644
--- a/usr.bin/dig/lib/lwres/include/lwres/lwres.h
+++ b/usr.bin/dig/lib/lwres/include/lwres/lwres.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwres.h,v 1.3 2020/02/12 13:05:04 jsg Exp $ */
+/* $Id: lwres.h,v 1.4 2024/08/14 17:36:48 florian Exp $ */
#ifndef LWRES_LWRES_H
#define LWRES_LWRES_H 1
@@ -101,7 +101,6 @@ struct lwres_addr {
*/
#define LWRES_CONFMAXNAMESERVERS 3 /*%< max 3 "nameserver" entries */
-#define LWRES_CONFMAXLWSERVERS 1 /*%< max 1 "lwserver" entry */
#define LWRES_CONFMAXSEARCH 8 /*%< max 8 domains in "search" entry */
#define LWRES_CONFMAXLINELEN 256 /*%< max size of a line */
#define LWRES_CONFMAXSORTLIST 10 /*%< max 10 */
@@ -111,9 +110,6 @@ typedef struct {
lwres_addr_t nameservers[LWRES_CONFMAXNAMESERVERS];
uint8_t nsnext; /*%< index for next free slot */
- lwres_addr_t lwservers[LWRES_CONFMAXLWSERVERS];
- uint8_t lwnext; /*%< index for next free slot */
-
char *domainname;
char *search[LWRES_CONFMAXSEARCH];
diff --git a/usr.bin/dig/lib/lwres/lwconfig.c b/usr.bin/dig/lib/lwres/lwconfig.c
index d94be248674..76d35e1c6d1 100644
--- a/usr.bin/dig/lib/lwres/lwconfig.c
+++ b/usr.bin/dig/lib/lwres/lwconfig.c
@@ -57,9 +57,6 @@ static lwres_result_t
lwres_conf_parsenameserver(lwres_conf_t *confdata, FILE *fp);
static lwres_result_t
-lwres_conf_parselwserver(lwres_conf_t *confdata, FILE *fp);
-
-static lwres_result_t
lwres_conf_parsedomain(lwres_conf_t *confdata, FILE *fp);
static lwres_result_t
@@ -159,7 +156,6 @@ lwres_conf_init(lwres_conf_t *confdata, int lwresflags) {
int i;
confdata->nsnext = 0;
- confdata->lwnext = 0;
confdata->domainname = NULL;
confdata->searchnxt = 0;
confdata->sortlistnxt = 0;
@@ -202,7 +198,6 @@ lwres_conf_clear(lwres_conf_t *confdata) {
}
confdata->nsnext = 0;
- confdata->lwnext = 0;
confdata->domainname = NULL;
confdata->searchnxt = 0;
confdata->sortlistnxt = 0;
@@ -242,31 +237,6 @@ lwres_conf_parsenameserver(lwres_conf_t *confdata, FILE *fp) {
}
static lwres_result_t
-lwres_conf_parselwserver(lwres_conf_t *confdata, FILE *fp) {
- char word[LWRES_CONFMAXLINELEN];
- int res;
-
- if (confdata->lwnext == LWRES_CONFMAXLWSERVERS)
- return (LWRES_R_SUCCESS);
-
- res = getword(fp, word, sizeof(word));
- if (strlen(word) == 0U)
- return (LWRES_R_FAILURE); /* Nothing on line. */
- else if (res == ' ' || res == '\t')
- res = eatwhite(fp);
-
- if (res != EOF && res != '\n')
- return (LWRES_R_FAILURE); /* Extra junk on line. */
-
- res = lwres_create_addr(word,
- &confdata->lwservers[confdata->lwnext++], 1);
- if (res != LWRES_R_SUCCESS)
- return (res);
-
- return (LWRES_R_SUCCESS);
-}
-
-static lwres_result_t
lwres_conf_parsedomain(lwres_conf_t *confdata, FILE *fp) {
char word[LWRES_CONFMAXLINELEN];
int res, i;
@@ -509,8 +479,6 @@ lwres_conf_parse(lwres_conf_t *confdata, const char *filename) {
rval = LWRES_R_SUCCESS;
else if (strcmp(word, "nameserver") == 0)
rval = lwres_conf_parsenameserver(confdata, fp);
- else if (strcmp(word, "lwserver") == 0)
- rval = lwres_conf_parselwserver(confdata, fp);
else if (strcmp(word, "domain") == 0)
rval = lwres_conf_parsedomain(confdata, fp);
else if (strcmp(word, "search") == 0)