Don't call proto_register_field_array() or expert_register_protocol() with

proto = -1

Change-Id: I60f899ad748b5d3e17f237552af7d2dbc8f27bd2
Reviewed-on: https://code.wireshark.org/review/17864
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
AndersBroman 2016-09-22 15:25:07 +02:00 committed by Anders Broman
parent d29b369bdc
commit 0b3d679368
12 changed files with 39 additions and 30 deletions

View File

@ -2930,7 +2930,7 @@ proto_register_aptx(void)
};
proto_aptx = proto_register_protocol("APT-X Codec", "APT-X", "aptx");
proto_register_field_array(proto_bta2dp, hf, array_length(hf));
proto_register_field_array(proto_aptx, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
aptx_handle = register_dissector("aptx", dissect_aptx, proto_aptx);
@ -3388,7 +3388,7 @@ proto_register_btvdp(void)
proto_btvdp = proto_register_protocol("Bluetooth VDP Profile", "BT VDP", "btvdp");
btvdp_handle = register_dissector("btvdp", dissect_btvdp, proto_btvdp);
proto_register_field_array(proto_bta2dp, hf, array_length(hf));
proto_register_field_array(proto_btvdp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_btavdtp = expert_register_protocol(proto_btvdp);
expert_register_field_array(expert_btavdtp, ei, array_length(ei));

View File

@ -10570,7 +10570,7 @@ static void dof_tun_register(void)
};
proto_2012_1_tunnel = proto_register_protocol(TUNNEL_PROTOCOL_STACK, "DTPS", "dtps");
proto_register_field_array(proto_2008_1_app, hf, array_length(hf));
proto_register_field_array(proto_2012_1_tunnel, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector(TUNNEL_PROTOCOL_STACK, dissect_tunnel_common, proto_2012_1_tunnel);

View File

@ -709,11 +709,11 @@ void proto_register_elasticsearch(void) {
expert_module_t*expert_elasticsearch;
proto_elasticsearch = proto_register_protocol("Elasticsearch", "Elasticsearch", "elasticsearch");
expert_elasticsearch = expert_register_protocol(proto_elasticsearch);
expert_register_field_array(expert_elasticsearch, ei, array_length(ei));
proto_elasticsearch = proto_register_protocol("Elasticsearch", "Elasticsearch", "elasticsearch");
proto_register_field_array(proto_elasticsearch, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));

View File

@ -741,13 +741,13 @@ proto_register_knet(void)
&ett_knet_payload
};
/* Register protocols */
proto_knet = proto_register_protocol ("kNet Protocol", "KNET", "knet");
/* Register header field & subtree arrays */
proto_register_field_array(proto_knet, hf_knet, array_length(hf_knet));
proto_register_subtree_array(ett_knet, array_length(ett_knet));
/* Register protocols */
proto_knet = proto_register_protocol ("kNet Protocol", "KNET", "knet");
knet_handle_sctp = register_dissector("knetsctp", dissect_knet_sctp, proto_knet);
knet_handle_tcp = register_dissector("knettcp", dissect_knet_tcp, proto_knet);
knet_handle_udp = register_dissector("knetudp", dissect_knet_udp, proto_knet);

View File

@ -2634,11 +2634,13 @@ proto_register_lmp(void)
ett[i] = &lmp_subtree[i];
}
expert_lmp = expert_register_protocol(proto_lmp);
expert_register_field_array(expert_lmp, ei, array_length(ei));
proto_lmp = proto_register_protocol("Link Management Protocol (LMP)",
"LMP", "lmp");
expert_lmp = expert_register_protocol(proto_lmp);
expert_register_field_array(expert_lmp, ei, array_length(ei));
proto_register_field_array(proto_lmp, lmpf_info, array_length(lmpf_info));
proto_register_subtree_array(ett, array_length(ett));

View File

@ -2548,11 +2548,11 @@ void proto_register_pcp(void)
expert_module_t* expert_pcp;
proto_pcp = proto_register_protocol("Performance Co-Pilot", "PCP", "pcp");
expert_pcp = expert_register_protocol(proto_pcp);
expert_register_field_array(expert_pcp, ei, array_length(ei));
proto_pcp = proto_register_protocol("Performance Co-Pilot", "PCP", "pcp");
proto_register_field_array(proto_pcp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));

View File

@ -622,11 +622,6 @@ proto_register_raknet(void)
*/
raknet_init_packet_names();
/*
* Register expert support.
*/
expert_raknet = expert_register_protocol(proto_raknet);
expert_register_field_array(expert_raknet, ei, array_length(ei));
/*
* Register the protocol with wireshark.
@ -637,6 +632,12 @@ proto_register_raknet(void)
"raknet" /* abbrev */
);
/*
* Register expert support.
*/
expert_raknet = expert_register_protocol(proto_raknet);
expert_register_field_array(expert_raknet, ei, array_length(ei));
/*
* Register detailed dissection arrays.
*/

View File

@ -1419,10 +1419,12 @@ proto_register_smcr(void)
&ett_rmbe_ctrl_peer_conn_state_flag
};
proto_register_field_array(proto_smcr, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_smcr = proto_register_protocol("Shared Memory Communications - RDMA",
"SMCR", "smcr");
proto_register_field_array(proto_smcr, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
smcr_tcp_handle = register_dissector("smcr", dissect_smcr_tcp, proto_smcr);
}

View File

@ -1063,11 +1063,14 @@ proto_register_usbip(void)
expert_module_t *expert_usbip;
expert_usbip = expert_register_protocol(proto_usbip);
expert_register_field_array(expert_usbip, ei, array_length(ei));
proto_usbip = proto_register_protocol("USBIP Protocol", "USBIP", "usbip");
proto_register_field_array(proto_usbip, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_usbip = expert_register_protocol(proto_usbip);
expert_register_field_array(expert_usbip, ei, array_length(ei));
}
void

View File

@ -414,7 +414,7 @@ proto_register_vines_frp(void)
proto_vines_frp = proto_register_protocol(
"Banyan Vines Fragmentation Protocol", "Vines FRP", "vines_frp");
proto_register_field_array(proto_vines_ip, hf, array_length(hf));
proto_register_field_array(proto_vines_frp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@ -489,7 +489,7 @@ proto_register_vines_llc(void)
proto_vines_llc = proto_register_protocol(
"Banyan Vines LLC", "Vines LLC", "vines_llc");
proto_register_field_array(proto_vines_ip, hf, array_length(hf));
proto_register_field_array(proto_vines_llc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
/* subdissector code */
@ -1324,7 +1324,7 @@ proto_register_vines_arp(void)
proto_vines_arp = proto_register_protocol(
"Banyan Vines ARP", "Vines ARP", "vines_arp");
proto_register_field_array(proto_vines_spp, hf, array_length(hf));
proto_register_field_array(proto_vines_arp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}

View File

@ -1378,12 +1378,13 @@ proto_register_xtp(void)
expert_module_t* expert_xtp;
expert_xtp = expert_register_protocol(proto_xtp);
expert_register_field_array(expert_xtp, ei, array_length(ei));
proto_xtp = proto_register_protocol("Xpress Transport Protocol", "XTP", "xtp");
proto_register_field_array(proto_xtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_xtp = expert_register_protocol(proto_xtp);
expert_register_field_array(expert_xtp, ei, array_length(ei));
}
void

View File

@ -2194,9 +2194,6 @@ void proto_register_zbee_nwk(void)
expert_module_t* expert_zbee_nwk;
expert_zbee_nwk = expert_register_protocol(proto_zbee_nwk);
expert_register_field_array(expert_zbee_nwk, ei, array_length(ei));
register_init_routine(proto_init_zbee_nwk);
register_cleanup_routine(proto_cleanup_zbee_nwk);
@ -2208,6 +2205,9 @@ void proto_register_zbee_nwk(void)
proto_register_field_array(proto_zbee_nwk, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_zbee_nwk = expert_register_protocol(proto_zbee_nwk);
expert_register_field_array(expert_zbee_nwk, ei, array_length(ei));
/* Register the dissectors with Wireshark. */
register_dissector(ZBEE_PROTOABBREV_NWK, dissect_zbee_nwk, proto_zbee_nwk);
register_dissector("zbee_beacon", dissect_zbee_beacon, proto_zbee_beacon);