forked from osmocom/wireshark
editcap: treat the "keep packets" flag as a Boolean.
Give it the type gboolean, initialize it to FALSE, and have -r set it to TRUE. This makes it a little clearer what it's doing.
This commit is contained in:
parent
a9ce232c37
commit
d98106876c
|
@ -155,7 +155,7 @@ GPtrArray *capture_comments = NULL;
|
|||
#define MAX_SELECTIONS 512
|
||||
static struct select_item selectfrm[MAX_SELECTIONS];
|
||||
static guint max_selected = 0;
|
||||
static int keep_em = 0;
|
||||
static gboolean keep_em = FALSE;
|
||||
static int out_file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcapng */
|
||||
static int out_frame_type = -2; /* Leave frame type alone */
|
||||
static int verbose = 0; /* Not so verbose */
|
||||
|
@ -1467,7 +1467,7 @@ invalid_time:
|
|||
break;
|
||||
|
||||
case 'r':
|
||||
keep_em = !keep_em; /* Just invert */
|
||||
keep_em = TRUE;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
|
@ -1714,7 +1714,7 @@ invalid_time:
|
|||
if (add_selection(argv[i], &max_packet_number) == FALSE)
|
||||
break;
|
||||
|
||||
if (keep_em == FALSE)
|
||||
if (!keep_em)
|
||||
max_packet_number = G_MAXUINT;
|
||||
|
||||
if (dup_detect || dup_detect_by_time) {
|
||||
|
|
Loading…
Reference in New Issue