lwserver is unused, whatever that is / was.
authorflorian <florian@openbsd.org>
Wed, 14 Aug 2024 17:36:48 +0000 (17:36 +0000)
committerflorian <florian@openbsd.org>
Wed, 14 Aug 2024 17:36:48 +0000 (17:36 +0000)
usr.bin/dig/lib/lwres/include/lwres/lwres.h
usr.bin/dig/lib/lwres/lwconfig.c

index 74e4921..b8029eb 100644 (file)
@@ -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];
index d94be24..76d35e1 100644 (file)
@@ -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)