More signed vs. unsigned argument cleanups.
Use the get.*guint32 routines to get unsigned values. Change-Id: I75e83b2d21bdf08c7c995e36e4deb3b1c6d6959d Reviewed-on: https://code.wireshark.org/review/17651 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
4abf452b19
commit
8629e60922
|
@ -270,7 +270,7 @@ set_autostop_criterion(capture_options *capture_opts, const char *autostoparg)
|
||||||
capture_opts->autostop_duration = get_positive_int(p,"autostop duration");
|
capture_opts->autostop_duration = get_positive_int(p,"autostop duration");
|
||||||
} else if (strcmp(autostoparg,"filesize") == 0) {
|
} else if (strcmp(autostoparg,"filesize") == 0) {
|
||||||
capture_opts->has_autostop_filesize = TRUE;
|
capture_opts->has_autostop_filesize = TRUE;
|
||||||
capture_opts->autostop_filesize = get_positive_int(p,"autostop filesize");
|
capture_opts->autostop_filesize = get_nonzero_guint32(p,"autostop filesize");
|
||||||
} else if (strcmp(autostoparg,"files") == 0) {
|
} else if (strcmp(autostoparg,"files") == 0) {
|
||||||
capture_opts->multi_files_on = TRUE;
|
capture_opts->multi_files_on = TRUE;
|
||||||
capture_opts->has_autostop_files = TRUE;
|
capture_opts->has_autostop_files = TRUE;
|
||||||
|
@ -373,10 +373,10 @@ get_ring_arguments(capture_options *capture_opts, const char *arg)
|
||||||
|
|
||||||
if (strcmp(arg,"files") == 0) {
|
if (strcmp(arg,"files") == 0) {
|
||||||
capture_opts->has_ring_num_files = TRUE;
|
capture_opts->has_ring_num_files = TRUE;
|
||||||
capture_opts->ring_num_files = get_positive_int(p, "number of ring buffer files");
|
capture_opts->ring_num_files = get_nonzero_guint32(p, "number of ring buffer files");
|
||||||
} else if (strcmp(arg,"filesize") == 0) {
|
} else if (strcmp(arg,"filesize") == 0) {
|
||||||
capture_opts->has_autostop_filesize = TRUE;
|
capture_opts->has_autostop_filesize = TRUE;
|
||||||
capture_opts->autostop_filesize = get_positive_int(p, "ring buffer filesize");
|
capture_opts->autostop_filesize = get_nonzero_guint32(p, "ring buffer filesize");
|
||||||
} else if (strcmp(arg,"duration") == 0) {
|
} else if (strcmp(arg,"duration") == 0) {
|
||||||
capture_opts->has_file_duration = TRUE;
|
capture_opts->has_file_duration = TRUE;
|
||||||
capture_opts->file_duration = get_positive_int(p, "ring buffer duration");
|
capture_opts->file_duration = get_positive_int(p, "ring buffer duration");
|
||||||
|
|
|
@ -251,7 +251,7 @@ main(int argc, char *argv[])
|
||||||
gboolean do_append = FALSE;
|
gboolean do_append = FALSE;
|
||||||
gboolean verbose = FALSE;
|
gboolean verbose = FALSE;
|
||||||
int in_file_count = 0;
|
int in_file_count = 0;
|
||||||
guint snaplen = 0;
|
guint32 snaplen = 0;
|
||||||
#ifdef PCAP_NG_DEFAULT
|
#ifdef PCAP_NG_DEFAULT
|
||||||
int file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcap format */
|
int file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcap format */
|
||||||
#else
|
#else
|
||||||
|
@ -362,7 +362,7 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
snaplen = get_positive_int(optarg, "snapshot length");
|
snaplen = get_nonzero_guint32(optarg, "snapshot length");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
|
|
|
@ -451,7 +451,7 @@ void commandline_other_options(int argc, char *argv[], gboolean opt_reset)
|
||||||
global_commandline_info.jump_backwards = SD_BACKWARD;
|
global_commandline_info.jump_backwards = SD_BACKWARD;
|
||||||
break;
|
break;
|
||||||
case 'g': /* Go to packet with the given packet number */
|
case 'g': /* Go to packet with the given packet number */
|
||||||
global_commandline_info.go_to_packet = get_positive_int(optarg, "go to packet");
|
global_commandline_info.go_to_packet = get_nonzero_guint32(optarg, "go to packet");
|
||||||
break;
|
break;
|
||||||
case 'J': /* Jump to the first packet which matches the filter criteria */
|
case 'J': /* Jump to the first packet which matches the filter criteria */
|
||||||
global_commandline_info.jfilter = optarg;
|
global_commandline_info.jfilter = optarg;
|
||||||
|
|
|
@ -42,7 +42,7 @@ typedef struct commandline_param_info
|
||||||
#endif
|
#endif
|
||||||
e_prefs *prefs_p;
|
e_prefs *prefs_p;
|
||||||
search_direction jump_backwards;
|
search_direction jump_backwards;
|
||||||
guint go_to_packet;
|
guint32 go_to_packet;
|
||||||
gchar* jfilter;
|
gchar* jfilter;
|
||||||
gchar* cf_name;
|
gchar* cf_name;
|
||||||
gchar* rfilter;
|
gchar* rfilter;
|
||||||
|
|
Loading…
Reference in New Issue