From a13ff67fcad7b6b219c269ccb75f255401d76dfa Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 14 Aug 2024 17:36:48 +0000 Subject: [PATCH] lwserver is unused, whatever that is / was. --- usr.bin/dig/lib/lwres/include/lwres/lwres.h | 6 +--- usr.bin/dig/lib/lwres/lwconfig.c | 32 --------------------- 2 files changed, 1 insertion(+), 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 @@ -56,9 +56,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); @@ -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; @@ -241,31 +236,6 @@ lwres_conf_parsenameserver(lwres_conf_t *confdata, FILE *fp) { return (LWRES_R_SUCCESS); } -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]; @@ -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) -- 2.20.1