From: Baptiste Jonglez Date: Thu, 9 Jun 2016 16:19:29 +0000 (+0100) Subject: Allow enabling IP info and ASN lookup from the curses interface X-Git-Tag: v0.87~7^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4bb85a80ee3eb76d803e3cd04de2ccdf0379415;p=thirdparty%2Fmtr.git Allow enabling IP info and ASN lookup from the curses interface Toggling IP info and ASN lookup from the curses interface can be done using 'z' or 'y'. But it was only allowed if it was first enabled via a command-line switch (either -z or -y). --- diff --git a/select.c b/select.c index 62478f4..b2c4349 100644 --- a/select.c +++ b/select.c @@ -240,15 +240,12 @@ void select_loop(void) { break; #ifdef IPINFO case ActionII: - if (ipinfo_no >= 0) { - ipinfo_no++; - if (ipinfo_no > ipinfo_max) - ipinfo_no = 0; - } + ipinfo_no++; + if (ipinfo_no > ipinfo_max) + ipinfo_no = 0; break; case ActionAS: - if (ipinfo_no >= 0) - ipinfo_no = ipinfo_no?0:ipinfo_max; + ipinfo_no = ipinfo_no?0:ipinfo_max; break; #endif