From 96eccd146a0ec1e91d2e7fff58fa45a568d933cd Mon Sep 17 00:00:00 2001 From: Job Snijders Date: Mon, 30 Dec 2019 18:12:28 +0000 Subject: [PATCH] More cleanup --- Makefile.am | 2 +- bgpq4.c | 28 ++++++++++++---------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Makefile.am b/Makefile.am index a07f229..c1d2f2e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,4 +16,4 @@ bgpq4.html: readme.header README.md cat readme.header README.md | @MARKDOWN@ > bgpq4.html maintainer-clean-local: - -rm -rf autom4te.cache + -rm -rf autom4te.cache config.h.in~ diff --git a/bgpq4.c b/bgpq4.c index 5593d82..4c84727 100644 --- a/bgpq4.c +++ b/bgpq4.c @@ -27,7 +27,7 @@ extern int expand_special_asn; int usage(int ecode) { - printf("\nUsage: bgpq4 [-h host[:port]] [-S sources] [-P|E|G " + printf("\nUsage: bgpq4 [-h host[:port]] [-S sources] [-E|G " "|f |t] [-2346ABbdJjKNnwXz] [-R len] ...\n"); printf(" -2 : allow routes belonging to as23456 (transition-as) " "(default: false)\n"); @@ -467,38 +467,34 @@ main(int argc, char* argv[]) if (aggregate && expander.vendor == V_JUNIPER && expander.generation == T_PREFIXLIST) { sx_report(SX_FATAL, "Sorry, aggregation (-A) does not work in" " Juniper prefix-lists\nYou can try route-filters (-E) " - "or route-filter-lists (-z) instead of prefix-lists " - "(-P, default)\n"); + "or route-filter-lists (-z) instead of prefix-lists\n."); exit(1); }; - if(aggregate && expander.vendor==V_FORMAT) { + if(aggregate && expander.vendor == V_FORMAT) { sx_report(SX_FATAL, "Sorry, aggregation (-A) is not compatible with " "formatted output (-F )\n"); exit(1); }; - if (aggregate && (expander.vendor == V_NOKIA_MD || expander.vendor == V_NOKIA) && - expander.generation != T_PREFIXLIST) { + if (aggregate && (expander.vendor == V_NOKIA_MD || expander.vendor == V_NOKIA) + && expander.generation != T_PREFIXLIST) { sx_report(SX_FATAL, "Sorry, aggregation (-A) is not supported with " - "ip-prefix-lists (-E) on Nokia. You can try prefix-lists (-P) " - "instead\n"); + "ip-prefix-lists (-E) on Nokia.\n"); exit(1); }; - if (refine && (expander.vendor == V_NOKIA_MD || expander.vendor == V_NOKIA) && - expander.generation != T_PREFIXLIST) { + if (refine && (expander.vendor == V_NOKIA_MD || expander.vendor == V_NOKIA) + && expander.generation != T_PREFIXLIST) { sx_report(SX_FATAL, "Sorry, more-specifics (-R) is not supported with " - "ip-prefix-lists (-E) on Nokia. You can try prefix-lists (-P) " - "instead\n"); + "ip-prefix-lists (-E) on Nokia.\n"); exit(1); }; - if (refineLow && (expander.vendor == V_NOKIA_MD || expander.vendor == V_NOKIA) && - expander.generation != T_PREFIXLIST) { + if (refineLow && (expander.vendor == V_NOKIA_MD || expander.vendor == V_NOKIA) + && expander.generation != T_PREFIXLIST) { sx_report(SX_FATAL, "Sorry, more-specifics (-r) is not supported with " - "ip-prefix-lists (-E) on Nokia. You can try prefix-lists (-P) " - "instead\n"); + "ip-prefix-lists (-E) on Nokia.\n"); exit(1); };