The registered -z parameter string shouldn't end with a comma.

If it ends with a comma, then, if you don't provide any parameters, you
get a "no such -z statistic" message followed by a list of available
statistics.

If it doesn't end with a comma, then, if you don't provide any
parameters *and* a parameter is required, you get a usage message, which
is more useful - and, in many of those cases, a parameter *isn't*
required.

Change-Id: I81275ea41ad4611d8210ca3cb07c09f0abde58f2
Reviewed-on: https://code.wireshark.org/review/5308
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2014-11-14 12:05:31 -08:00
parent 4729e13df7
commit 04ab731933
14 changed files with 14 additions and 14 deletions

View File

@ -156,7 +156,7 @@ ansi_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
static stat_tap_ui ansi_a_stat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"ansi_a,",
"ansi_a",
ansi_a_stat_init,
-1,
0,

View File

@ -177,7 +177,7 @@ dhcpstat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui dhcpstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"bootp,stat,",
"bootp,stat",
dhcpstat_init,
-1,
0,

View File

@ -565,7 +565,7 @@ comparestat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui comparestat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"compare,",
"compare",
comparestat_init,
-1,
0,

View File

@ -291,7 +291,7 @@ dcerpcstat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui dcerpcstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"dcerpc,srt,",
"dcerpc,srt",
dcerpcstat_init,
-1,
0,

View File

@ -342,7 +342,7 @@ gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
static stat_tap_ui gsm_a_stat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"gsm_a,",
"gsm_a",
gsm_a_stat_init,
-1,
0,

View File

@ -323,7 +323,7 @@ httpstat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui httpstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"http,stat,",
"http,stat",
httpstat_init,
-1,
0,

View File

@ -1499,7 +1499,7 @@ iostat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui iostat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"io,stat,",
"io,stat",
iostat_init,
-1,
0,

View File

@ -133,7 +133,7 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui protocolinfo_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"proto,colinfo,",
"proto,colinfo",
protocolinfo_init,
-1,
0,

View File

@ -345,7 +345,7 @@ rpcstat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui rpcstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"rpc,srt,",
"rpc,srt",
rpcstat_init,
-1,
0,

View File

@ -276,7 +276,7 @@ rtspstat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui rtspstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"rtsp,stat,",
"rtsp,stat",
rtspstat_init,
-1,
0,

View File

@ -254,7 +254,7 @@ scsistat_init(const char *opt_arg, void* userdata _U_)
static stat_tap_ui scsistat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"scsi,srt,",
"scsi,srt",
scsistat_init,
-1,
0,

View File

@ -279,7 +279,7 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
static stat_tap_ui wspstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"wsp,stat,",
"wsp,stat",
wspstat_init,
-1,
0,

View File

@ -717,7 +717,7 @@ void gtk_dcerpcstat_cb(GtkAction *action _U_, gpointer user_data _U_)
static stat_tap_ui dcerpcstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"dcerpc,srt,",
"dcerpc,srt",
gtk_dcerpcstat_init,
-1,
0,

View File

@ -526,7 +526,7 @@ gtk_rpcstat_cb(GtkAction *action _U_, gpointer user_data _U_)
static stat_tap_ui rpcstat_ui = {
REGISTER_STAT_GROUP_GENERIC,
NULL,
"rpc,srt,",
"rpc,srt",
gtk_rpcstat_init,
-1,
0,