Use boolean false/true for show_src option value.

Signed-off-by: Vadim Kochan <[email protected]>
---
 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 * (show_src ? 1 : 0));
        }
 
        mvwprintw(screen, 1, 2,
@@ -1552,7 +1553,7 @@ int main(int argc, char **argv)
                        what_cmd |= INCLUDE_SCTP;
                        break;
                case 's':
-                       show_src = 1;
+                       show_src = true;
                        break;
                case 'u':
                        update_geoip();
-- 
2.6.1

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to