From ced8a825036f58e746bc883fc777931bd9851072 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 1 Nov 2023 17:00:45 +0100 Subject: [PATCH] fix consistency check for delv +ns and +qmin the code to prevent +qmin from being used without +ns was in the wrong place, resulting in it only working correctly if +ns was specified first. --- bin/delv/delv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/delv/delv.c b/bin/delv/delv.c index 25ff05e857c..16e005ab7fe 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -1378,10 +1378,6 @@ plus_option(char *option) { fprintf(stderr, "Invalid option: +%s\n", option); usage(); } - - if (qmin && !fulltrace) { - fatal("'+qmin' cannot be used without '+ns'"); - } return; } @@ -1730,6 +1726,11 @@ parse_args(int argc, char **argv) { } } + /* check consistency */ + if (qmin && !fulltrace) { + fatal("'+qmin' cannot be used without '+ns'"); + } + /* * If no qname or qtype specified, search for root/NS * If no qtype specified, use A -- 2.47.3