On 2015-10-27 at 01:00:51 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > Use boolean false/true for show_src option value. > > Signed-off-by: Vadim Kochan <vadi...@gmail.com> > --- > flowtop.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/flowtop.c b/flowtop.c > index 9d32da3..40142df 100644 > --- a/flowtop.c > +++ b/flowtop.c > @@ -111,7 +111,7 @@ enum rate_units { > > static volatile bool is_flow_collecting; > static volatile sig_atomic_t sigint = 0; > -static int what = INCLUDE_IPV4 | INCLUDE_IPV6 | INCLUDE_TCP, show_src = 0; > +static int what = INCLUDE_IPV4 | INCLUDE_IPV6 | INCLUDE_TCP; > static struct flow_list flow_list; > static struct sysctl_params_ctx sysctl = { -1, -1 }; > > @@ -119,6 +119,7 @@ static unsigned int interval = 1; > static bool resolve_dns = true; > static bool resolve_geoip = true; > static enum rate_units rate_type = RATE_BITS; > +static bool show_src = false; > > static const char *short_options = "vhTUsDIS46ut:nGB"; > static const struct option long_options[] = { > @@ -1131,7 +1132,7 @@ static void presenter_screen_update(WINDOW *screen, > struct flow_list *fl, > presenter_screen_do_line(screen, n, &line); > > line++; > - maxy -= (2 + 1 * show_src); > + maxy -= (2 + 1 * );
This could be maxy -= (2 + (show_src ? 1 : 0)); I'll fold this in when applying. Thanks -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to netsniff-ng+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.