From: Ralph Ronnquist Date: Tue, 2 Nov 2021 21:02:38 +0000 (+1100) Subject: moved -tpg argument to be second X-Git-Tag: 1.5.2~2 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=8a97adf1ba0db7e54f0fab087d6f0a54fba5374c;p=rrq%2Frrqnet.git moved -tpg argument to be second --- diff --git a/rrqnet.c b/rrqnet.c index b28b3c8..fa8d3f6 100644 --- a/rrqnet.c +++ b/rrqnet.c @@ -1411,11 +1411,6 @@ int main(int argc, char *argv[]) { ///// Parse command line arguments i = 1; #define ENSUREARGS(n) if ( argc < i + n ) usage() - ENSUREARGS( 1 ); - if ( strncmp( "-tpg", argv[i], 4 ) == 0 ) { - tpg_quirk = 1; - i++; - } ENSUREARGS( 1 ); // First: optional -v, -vv or -vvv if ( strncmp( "-v", argv[i], 2 ) == 0 ) { @@ -1431,6 +1426,11 @@ int main(int argc, char *argv[]) { i++; ENSUREARGS( 1 ); } + if ( strncmp( "-tpg", argv[i], 4 ) == 0 ) { + tpg_quirk = 1; + i++; + ENSUREARGS( 1 ); + } // then: optional -4 if ( strncmp( "-4", argv[i], 2 ) == 0 ) { udp6 = 0;