diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2024-04-02 14:37:13 +0200 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2024-04-05 21:38:28 +0000 |
commit | d0b143bbecf422db5b6f51b549726786e85a3540 (patch) | |
tree | dfc9976aadc230136d47e596d7329e7c5ebe23fe /epan | |
parent | c47011890a8cb5749cb6dcdb328743a0e2c4778d (diff) |
Remove init to zero for static variables
The C standard requires that objects with static storage duration
is initialized to zero.
Diffstat (limited to 'epan')
619 files changed, 2167 insertions, 2167 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index dfd4d5cf39..f3a8ca8732 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -207,21 +207,21 @@ typedef struct _serv_port_custom_key { port_type type; } serv_port_custom_key_t; -static wmem_allocator_t *addr_resolv_scope = NULL; +static wmem_allocator_t *addr_resolv_scope; // Maps guint -> hashipxnet_t* -static wmem_map_t *ipxnet_hash_table = NULL; -static wmem_map_t *ipv4_hash_table = NULL; -static wmem_map_t *ipv6_hash_table = NULL; +static wmem_map_t *ipxnet_hash_table; +static wmem_map_t *ipv4_hash_table; +static wmem_map_t *ipv6_hash_table; // Maps guint -> hashvlan_t* -static wmem_map_t *vlan_hash_table = NULL; -static wmem_map_t *ss7pc_hash_table = NULL; +static wmem_map_t *vlan_hash_table; +static wmem_map_t *ss7pc_hash_table; // Maps IP address -> manually set hostname. -static wmem_map_t *manually_resolved_ipv4_list = NULL; -static wmem_map_t *manually_resolved_ipv6_list = NULL; +static wmem_map_t *manually_resolved_ipv4_list; +static wmem_map_t *manually_resolved_ipv6_list; -static addrinfo_lists_t addrinfo_lists = { NULL, NULL}; +static addrinfo_lists_t addrinfo_lists; struct cb_serv_data { gchar *service; @@ -232,24 +232,24 @@ struct cb_serv_data { // XXX: Note that hashmanuf_t* only accommodates 24-bit OUIs. // We might want to store vendor names from MA-M and MA-S to // present in the Resolved Addresses dialog. -static wmem_map_t *manuf_hashtable = NULL; +static wmem_map_t *manuf_hashtable; // Maps address -> hashwka_t* -static wmem_map_t *wka_hashtable = NULL; +static wmem_map_t *wka_hashtable; // Maps address -> hashether_t* -static wmem_map_t *eth_hashtable = NULL; +static wmem_map_t *eth_hashtable; // Maps guint -> serv_port_t* -static wmem_map_t *serv_port_hashtable = NULL; -static wmem_map_t *serv_port_custom_hashtable = NULL; +static wmem_map_t *serv_port_hashtable; +static wmem_map_t *serv_port_custom_hashtable; // Maps enterprise-id -> enterprise-desc (only used for user additions) -static GHashTable *enterprises_hashtable = NULL; +static GHashTable *enterprises_hashtable; static subnet_length_entry_t subnet_length_entries[SUBNETLENGTHSIZE]; /* Ordered array of entries */ -static gboolean have_subnet_entry = FALSE; +static gboolean have_subnet_entry; -static gboolean new_resolved_objects = FALSE; +static gboolean new_resolved_objects; -static GPtrArray* extra_hosts_files = NULL; +static GPtrArray* extra_hosts_files; static hashether_t *add_eth_name(const guint8 *addr, const gchar *name); static void add_serv_port_cb(const guint32 port, gpointer ptr); @@ -307,7 +307,7 @@ e_addr_resolve gbl_resolv_flags = { * "The recommended concurrent query limit is about 32k queries" */ static guint name_resolve_concurrency = 500; -static gboolean resolve_synchronously = FALSE; +static gboolean resolve_synchronously; /* * Global variables (can be changed in GUI sections) @@ -315,19 +315,19 @@ static gboolean resolve_synchronously = FALSE; * GUI code to change them. */ -gchar *g_ethers_path = NULL; /* global ethers file */ -gchar *g_pethers_path = NULL; /* personal ethers file */ -gchar *g_wka_path = NULL; /* global well-known-addresses file */ -gchar *g_manuf_path = NULL; /* global manuf file */ -gchar *g_pmanuf_path = NULL; /* personal manuf file */ -gchar *g_ipxnets_path = NULL; /* global ipxnets file */ -gchar *g_pipxnets_path = NULL; /* personal ipxnets file */ -gchar *g_services_path = NULL; /* global services file */ -gchar *g_pservices_path = NULL; /* personal services file */ -gchar *g_pvlan_path = NULL; /* personal vlans file */ -gchar *g_ss7pcs_path = NULL; /* personal ss7pcs file */ -gchar *g_enterprises_path = NULL; /* global enterprises file */ -gchar *g_penterprises_path = NULL; /* personal enterprises file */ +gchar *g_ethers_path; /* global ethers file */ +gchar *g_pethers_path; /* personal ethers file */ +gchar *g_wka_path; /* global well-known-addresses file */ +gchar *g_manuf_path; /* global manuf file */ +gchar *g_pmanuf_path; /* personal manuf file */ +gchar *g_ipxnets_path; /* global ipxnets file */ +gchar *g_pipxnets_path; /* personal ipxnets file */ +gchar *g_services_path; /* global services file */ +gchar *g_pservices_path; /* personal services file */ +gchar *g_pvlan_path; /* personal vlans file */ +gchar *g_ss7pcs_path; /* personal ss7pcs file */ +gchar *g_enterprises_path; /* global enterprises file */ +gchar *g_penterprises_path; /* personal enterprises file */ /* first resolving call */ /* @@ -373,13 +373,13 @@ typedef struct _sync_dns_data static ares_channel ghba_chan; /* ares_gethostbyaddr -- Usually non-interactive, no timeout */ static ares_channel ghbn_chan; /* ares_gethostbyname -- Usually interactive, timeout */ -static gboolean async_dns_initialized = FALSE; -static guint async_dns_in_flight = 0; -static wmem_list_t *async_dns_queue_head = NULL; +static gboolean async_dns_initialized; +static guint async_dns_in_flight; +static wmem_list_t *async_dns_queue_head; static GMutex async_dns_queue_mtx; //UAT for providing a list of DNS servers to C-ARES for name resolution -bool use_custom_dns_server_list = false; +bool use_custom_dns_server_list; struct dns_server_data { char *ipaddr; guint32 udp_port; @@ -390,9 +390,9 @@ UAT_CSTRING_CB_DEF(dnsserverlist_uats, ipaddr, struct dns_server_data) UAT_DEC_CB_DEF(dnsserverlist_uats, tcp_port, struct dns_server_data) UAT_DEC_CB_DEF(dnsserverlist_uats, udp_port, struct dns_server_data) -static uat_t *dnsserver_uat = NULL; -static struct dns_server_data *dnsserverlist_uats = NULL; -static guint ndnsservers = 0; +static uat_t *dnsserver_uat; +static struct dns_server_data *dnsserverlist_uats; +static guint ndnsservers; static void dns_server_free_cb(void *data) @@ -1695,7 +1695,7 @@ parse_ether_line(char *line, ether_t *eth, unsigned int *mask, } /* parse_ether_line */ -static FILE *eth_p = NULL; +static FILE *eth_p; static void set_ethent(char *path) @@ -2350,7 +2350,7 @@ parse_ipxnets_line(char *line, ipxnet_t *ipxnet) } /* parse_ipxnets_line */ -static FILE *ipxnet_p = NULL; +static FILE *ipxnet_p; static void set_ipxnetent(char *path) @@ -2510,7 +2510,7 @@ parse_vlan_line(char *line, vlan_t *vlan) } /* parse_vlan_line */ -static FILE *vlan_p = NULL; +static FILE *vlan_p; static void set_vlanent(char *path) diff --git a/epan/app_mem_usage.c b/epan/app_mem_usage.c index 22108c89b9..a2a7c18c3e 100644 --- a/epan/app_mem_usage.c +++ b/epan/app_mem_usage.c @@ -160,7 +160,7 @@ static guint memory_register_num = 2; static const ws_mem_usage_t *memory_components[MAX_COMPONENTS]; -static guint memory_register_num = 0; +static guint memory_register_num; #endif diff --git a/epan/capture_dissectors.c b/epan/capture_dissectors.c index 406de69ddc..f3fb1cd1f7 100644 --- a/epan/capture_dissectors.c +++ b/epan/capture_dissectors.c @@ -38,9 +38,9 @@ typedef struct capture_dissector_count guint32 count; } capture_dissector_count_t; -static GHashTable *registered_dissectors = NULL; +static GHashTable *registered_dissectors; -static GHashTable *capture_dissector_tables = NULL; +static GHashTable *capture_dissector_tables; static void destroy_capture_dissector_table(void *data) diff --git a/epan/color_filters.c b/epan/color_filters.c index 80e9282248..d63842aa9d 100644 --- a/epan/color_filters.c +++ b/epan/color_filters.c @@ -41,12 +41,12 @@ static int read_filters_file(const char *path, FILE *f, void *user_data, color_filter_add_cb_func add_cb); /* the currently active filters */ -static GSList *color_filter_list = NULL; +static GSList *color_filter_list; /* keep "old" deleted filters in this list until * the dissection no longer needs them (e.g. file is closed) */ -static GSList *color_filter_deleted_list = NULL; -static GSList *color_filter_valid_list = NULL; +static GSList *color_filter_deleted_list; +static GSList *color_filter_valid_list; /* Color Filters can en-/disabled. */ static bool filters_enabled = true; @@ -54,7 +54,7 @@ static bool filters_enabled = true; /* Remember if there are temporary coloring filters set to * add sensitivity to the "Reset Coloring 1-10" menu item */ -static bool tmp_colors_set = false; +static bool tmp_colors_set; /* Create a new filter */ color_filter_t * diff --git a/epan/column.c b/epan/column.c index c30db61527..1d8f09c33e 100644 --- a/epan/column.c +++ b/epan/column.c @@ -27,8 +27,8 @@ #include <wsutil/ws_assert.h> static int proto_cols; -static hf_register_info *hf_cols = NULL; -static unsigned int hf_cols_cleanup = 0; +static hf_register_info *hf_cols; +static unsigned int hf_cols_cleanup; /* Given a format number (as defined in column-utils.h), returns its equivalent string */ diff --git a/epan/conversation.c b/epan/conversation.c index 403021298e..7ad3d493fc 100644 --- a/epan/conversation.c +++ b/epan/conversation.c @@ -36,7 +36,7 @@ #include "conversation_debug.h" #ifdef DEBUG_CONVERSATION -int _debug_conversation_indent = 0; +int _debug_conversation_indent; #endif /* @@ -86,37 +86,37 @@ static const char *type_names[] = { /* * Hash table of hash tables for conversations identified by element lists. */ -static wmem_map_t *conversation_hashtable_element_list = NULL; +static wmem_map_t *conversation_hashtable_element_list; /* * Hash table for conversations based on addresses only */ -static wmem_map_t *conversation_hashtable_exact_addr = NULL; +static wmem_map_t *conversation_hashtable_exact_addr; /* * Hash table for conversations with no wildcards. */ -static wmem_map_t *conversation_hashtable_exact_addr_port = NULL; +static wmem_map_t *conversation_hashtable_exact_addr_port; /* * Hash table for conversations with one wildcard address. */ -static wmem_map_t *conversation_hashtable_no_addr2 = NULL; +static wmem_map_t *conversation_hashtable_no_addr2; /* * Hash table for conversations with one wildcard port. */ -static wmem_map_t *conversation_hashtable_no_port2 = NULL; +static wmem_map_t *conversation_hashtable_no_port2; /* * Hash table for conversations with one wildcard address and port. */ -static wmem_map_t *conversation_hashtable_no_addr2_or_port2 = NULL; +static wmem_map_t *conversation_hashtable_no_addr2_or_port2; /* * Hash table for conversations with a single unsigned ID number. */ -static wmem_map_t *conversation_hashtable_id = NULL; +static wmem_map_t *conversation_hashtable_id; static guint32 new_index; diff --git a/epan/conversation_filter.c b/epan/conversation_filter.c index 58d776b39c..ded403e0ce 100644 --- a/epan/conversation_filter.c +++ b/epan/conversation_filter.c @@ -17,10 +17,10 @@ #include "conversation_filter.h" -GList *packet_conv_filter_list = NULL; -GList *log_conv_filter_list = NULL; +GList *packet_conv_filter_list; +GList *log_conv_filter_list; -static GSList *conversation_proto_names = NULL; +static GSList *conversation_proto_names; void conversation_filters_init(void) { diff --git a/epan/conversation_table.c b/epan/conversation_table.c index 07ac311209..24a1d122e9 100644 --- a/epan/conversation_table.c +++ b/epan/conversation_table.c @@ -59,7 +59,7 @@ tap_packet_cb get_hostlist_packet_func(register_ct_t* ct) return get_endpoint_packet_func(ct); } -static wmem_tree_t *registered_ct_tables = NULL; +static wmem_tree_t *registered_ct_tables; void dissector_conversation_init(const char *opt_arg, void* userdata) diff --git a/epan/decode_as.c b/epan/decode_as.c index 285dbe4160..370f0df74a 100644 --- a/epan/decode_as.c +++ b/epan/decode_as.c @@ -24,7 +24,7 @@ #include <errno.h> #include <wsutil/ws_assert.h> -GList *decode_as_list = NULL; +GList *decode_as_list; void register_decode_as(decode_as_t* reg) { @@ -180,7 +180,7 @@ gboolean decode_as_default_change(const gchar *name, gconstpointer pattern, gcon /* * A list of dissectors that need to be reset. */ -static GSList *dissector_reset_list = NULL; +static GSList *dissector_reset_list; /* * A callback function to parse each "decode as" entry in the file and apply the change diff --git a/epan/dfilter/dfilter-macro-uat.c b/epan/dfilter/dfilter-macro-uat.c index bf826dcbf3..939975186a 100644 --- a/epan/dfilter/dfilter-macro-uat.c +++ b/epan/dfilter/dfilter-macro-uat.c @@ -20,7 +20,7 @@ * new "dmacros" configuration file. It should be removed eventually. */ -static dfilter_macro_t* macros = NULL; +static dfilter_macro_t* macros; static unsigned num_macros; static void macro_uat_free(void* r) { diff --git a/epan/dfilter/dfilter-macro.c b/epan/dfilter/dfilter-macro.c index 3d63c6302f..78b57db4a3 100644 --- a/epan/dfilter/dfilter-macro.c +++ b/epan/dfilter/dfilter-macro.c @@ -24,7 +24,7 @@ #include <wsutil/glib-compat.h> #include <wsutil/filter_files.h> -static GHashTable *macros_table = NULL; +static GHashTable *macros_table; /* #define DUMP_DFILTER_MACRO */ #ifdef DUMP_DFILTER_MACRO diff --git a/epan/dfilter/dfilter-plugin.c b/epan/dfilter/dfilter-plugin.c index 6996ea9f10..0e886d0889 100644 --- a/epan/dfilter/dfilter-plugin.c +++ b/epan/dfilter/dfilter-plugin.c @@ -19,7 +19,7 @@ */ /* DFilter plugins share the name with the function it implements. */ -GSList *dfilter_plugins = NULL; +GSList *dfilter_plugins; void dfilter_plugins_register(const dfilter_plugin *plug) { diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c index fc3bb3658d..9665a91e40 100644 --- a/epan/dfilter/dfilter.c +++ b/epan/dfilter/dfilter.c @@ -32,7 +32,7 @@ #define DFILTER_TOKEN_ID_OFFSET 1 /* Holds the singular instance of our Lemon parser object */ -static void* ParserObj = NULL; +static void* ParserObj; df_loc_t loc_empty = {-1, 0}; diff --git a/epan/dfilter/dfunctions.c b/epan/dfilter/dfunctions.c index 22af385f1f..8c4c26117b 100644 --- a/epan/dfilter/dfunctions.c +++ b/epan/dfilter/dfunctions.c @@ -25,9 +25,9 @@ #include <wsutil/ws_assert.h> -static GHashTable *registered_functions = NULL; +static GHashTable *registered_functions; -static GPtrArray *registered_names = NULL; +static GPtrArray *registered_names; /* Convert an FT_STRING using a callback function */ static bool diff --git a/epan/disabled_protos.c b/epan/disabled_protos.c index d48c629e4d..e51888fcc0 100644 --- a/epan/disabled_protos.c +++ b/epan/disabled_protos.c @@ -49,20 +49,20 @@ typedef struct { /* * List of disabled protocols */ -static GList *global_disabled_protos = NULL; -static GList *disabled_protos = NULL; +static GList *global_disabled_protos; +static GList *disabled_protos; /* * List of enabled protocols (that are disabled by default) */ -static GList *global_enabled_protos = NULL; -static GList *enabled_protos = NULL; +static GList *global_enabled_protos; +static GList *enabled_protos; /* * List of disabled heuristics */ -static GList *global_disabled_heuristics = NULL; -static GList *disabled_heuristics = NULL; +static GList *global_disabled_heuristics; +static GList *disabled_heuristics; -static gboolean unsaved_changes = FALSE; +static gboolean unsaved_changes; #define INIT_BUF_SIZE 128 diff --git a/epan/dissectors/asn1/acse/packet-acse-template.c b/epan/dissectors/asn1/acse/packet-acse-template.c index 68d0851995..b055342719 100644 --- a/epan/dissectors/asn1/acse/packet-acse-template.c +++ b/epan/dissectors/asn1/acse/packet-acse-template.c @@ -63,7 +63,7 @@ static expert_field ei_acse_dissector_not_available; static expert_field ei_acse_malformed; static expert_field ei_acse_invalid_oid; -static dissector_handle_t acse_handle = NULL; +static dissector_handle_t acse_handle; /* indirect_reference, used to pick up the signalling so we know what kind of data is transferred in SES_DATA_TRANSFER_PDUs */ @@ -76,7 +76,7 @@ typedef struct _acse_ctx_oid_t { guint32 ctx_id; char *oid; } acse_ctx_oid_t; -static wmem_map_t *acse_ctx_oid_table = NULL; +static wmem_map_t *acse_ctx_oid_table; static guint acse_ctx_oid_hash(gconstpointer k) diff --git a/epan/dissectors/asn1/ain/packet-ain-template.c b/epan/dissectors/asn1/ain/packet-ain-template.c index 07a7e009a7..dc44621a3a 100644 --- a/epan/dissectors/asn1/ain/packet-ain-template.c +++ b/epan/dissectors/asn1/ain/packet-ain-template.c @@ -74,8 +74,8 @@ static expert_field ei_ain_unknown_returnResultData; static expert_field ei_ain_unknown_returnErrorData; /* Global variables */ -static guint32 opcode = 0; -static guint32 errorCode = 0; +static guint32 opcode; +static guint32 errorCode; //static const char *obj_id = NULL; static int ain_opcode_type; diff --git a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c index 0b78391cd7..342ea561b9 100644 --- a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c +++ b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c @@ -102,7 +102,7 @@ static range_t *global_ssn_range; #define ANSI_MAP_TID_SOURCE_AND_DEST 2 static gint ansi_map_response_matching_type = ANSI_MAP_TID_AND_SOURCE; -static dissector_handle_t ansi_map_handle=NULL; +static dissector_handle_t ansi_map_handle; /* Initialize the protocol and registered fields */ static int ansi_map_tap; @@ -359,7 +359,7 @@ static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */ static dissector_table_t is801_dissector_table; /* IS-801 (PLD) */ static packet_info *g_pinfo; static proto_tree *g_tree; -static tvbuff_t *SMS_BearerData_tvb = NULL; +static tvbuff_t *SMS_BearerData_tvb; static gint32 ansi_map_sms_tele_id = -1; static gboolean is683_ota; static gboolean is801_pld; @@ -377,7 +377,7 @@ static void dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo /* Transaction table */ -static wmem_multimap_t *TransactionId_table=NULL; +static wmem_multimap_t *TransactionId_table; /* Store Invoke information needed for the corresponding reply */ static void diff --git a/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c b/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c index 0a6226ab80..d201951086 100644 --- a/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c +++ b/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c @@ -67,7 +67,7 @@ static expert_field ei_ansi_tcap_dissector_not_implemented; static struct tcapsrt_info_t * gp_tcapsrt_info; static gboolean tcap_subdissector_used=FALSE; -static struct tcaphash_context_t * gp_tcap_context=NULL; +static struct tcaphash_context_t * gp_tcap_context; /* Note the high bit should be masked off when registering in this table (0x7fff)*/ static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation Codes */ @@ -83,7 +83,7 @@ static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation int tcapsrt_global_current=0; struct tcapsrt_info_t tcapsrt_global_info[MAX_TCAP_INSTANCE]; -static dissector_table_t ber_oid_dissector_table=NULL; +static dissector_table_t ber_oid_dissector_table; static const char * cur_oid; static const char * tcapext_oid; @@ -130,7 +130,7 @@ struct ansi_tcap_invokedata_t { gint32 OperationCode_national; }; -static wmem_multimap_t *TransactionId_table=NULL; +static wmem_multimap_t *TransactionId_table; /* Store Invoke information needed for the corresponding reply */ static void diff --git a/epan/dissectors/asn1/atn-ulcs/packet-atn-ulcs-template.c b/epan/dissectors/asn1/atn-ulcs/packet-atn-ulcs-template.c index 46b6d4eb08..c8a3da402e 100644 --- a/epan/dissectors/asn1/atn-ulcs/packet-atn-ulcs-template.c +++ b/epan/dissectors/asn1/atn-ulcs/packet-atn-ulcs-template.c @@ -116,18 +116,18 @@ void proto_reg_handoff_atn_ulcs(void); static heur_dissector_list_t atn_ulcs_heur_subdissector_list; /* presentation subdissectors i.e. CM, CPDLC */ -static dissector_handle_t atn_cm_handle = NULL; -static dissector_handle_t atn_cpdlc_handle = NULL; +static dissector_handle_t atn_cm_handle; +static dissector_handle_t atn_cpdlc_handle; static int proto_atn_ulcs; -static guint32 ulcs_context_value = 0; +static guint32 ulcs_context_value; static const char *object_identifier_id; -static wmem_tree_t *aarq_data_tree = NULL; -static wmem_tree_t *atn_conversation_tree = NULL; +static wmem_tree_t *aarq_data_tree; +static wmem_tree_t *atn_conversation_tree; -static proto_tree *root_tree = NULL; +static proto_tree *root_tree; /* forward declarations for functions generated from asn1 */ static int dissect_atn_ulcs_T_externalt_encoding_single_asn1_type( diff --git a/epan/dissectors/asn1/c1222/packet-c1222-template.c b/epan/dissectors/asn1/c1222/packet-c1222-template.c index cbd6847715..c11c7c6aec 100644 --- a/epan/dissectors/asn1/c1222/packet-c1222-template.c +++ b/epan/dissectors/asn1/c1222/packet-c1222-template.c @@ -66,8 +66,8 @@ void proto_register_c1222(void); -static dissector_handle_t c1222_handle=NULL; -static dissector_handle_t c1222_udp_handle=NULL; +static dissector_handle_t c1222_handle; +static dissector_handle_t c1222_udp_handle; /* Initialize the protocol and registered fields */ static int proto_c1222; @@ -142,43 +142,43 @@ static int ett_c1222_crypto; static int ett_c1222_cmd; /* these pointers are for the header elements that may be needed to verify the crypto */ -static guint8 *aSO_context = NULL; -static guint8 *called_AP_title = NULL; -static guint8 *called_AP_invocation_id = NULL; -static guint8 *calling_AE_qualifier = NULL; -static guint8 *calling_AP_invocation_id = NULL; -static guint8 *mechanism_name = NULL; -static guint8 *calling_authentication_value = NULL; -static guint8 *user_information = NULL; -static guint8 *calling_AP_title = NULL; -static guint8 *key_id_element = NULL; -static guint8 *iv_element = NULL; +static guint8 *aSO_context; +static guint8 *called_AP_title; +static guint8 *called_AP_invocation_id; +static guint8 *calling_AE_qualifier; +static guint8 *calling_AP_invocation_id; +static guint8 *mechanism_name; +static guint8 *calling_authentication_value; +static guint8 *user_information; +static guint8 *calling_AP_title; +static guint8 *key_id_element; +static guint8 *iv_element; /* these are the related lengths */ -static guint32 aSO_context_len = 0; -static guint32 called_AP_title_len = 0; -static guint32 called_AP_invocation_id_len = 0; -static guint32 calling_AE_qualifier_len = 0; -static guint32 calling_AP_invocation_id_len = 0; -static guint32 mechanism_name_len = 0; -static guint32 calling_authentication_value_len = 0; -static guint32 user_information_len = 0; -static guint32 calling_AP_title_len = 0; -static guint32 key_id_element_len = 0; -static guint32 iv_element_len = 0; +static guint32 aSO_context_len; +static guint32 called_AP_title_len; +static guint32 called_AP_invocation_id_len; +static guint32 calling_AE_qualifier_len; +static guint32 calling_AP_invocation_id_len; +static guint32 mechanism_name_len; +static guint32 calling_authentication_value_len; +static guint32 user_information_len; +static guint32 calling_AP_title_len; +static guint32 key_id_element_len; +static guint32 iv_element_len; /* these are the related allocation sizes (which might be different from the lengths) */ -static guint32 aSO_context_allocated = 0; -static guint32 called_AP_title_allocated = 0; -static guint32 called_AP_invocation_id_allocated = 0; -static guint32 calling_AE_qualifier_allocated = 0; -static guint32 calling_AP_invocation_id_allocated = 0; -static guint32 mechanism_name_allocated = 0; -static guint32 calling_authentication_value_allocated = 0; -static guint32 user_information_allocated = 0; -static guint32 calling_AP_title_allocated = 0; -static guint32 key_id_element_allocated = 0; -static guint32 iv_element_allocated = 0; +static guint32 aSO_context_allocated; +static guint32 called_AP_title_allocated; +static guint32 called_AP_invocation_id_allocated; +static guint32 calling_AE_qualifier_allocated; +static guint32 calling_AP_invocation_id_allocated; +static guint32 mechanism_name_allocated; +static guint32 calling_authentication_value_allocated; +static guint32 user_information_allocated; +static guint32 calling_AP_title_allocated; +static guint32 key_id_element_allocated; +static guint32 iv_element_allocated; #include "packet-c1222-ett.c" @@ -195,10 +195,10 @@ static expert_field ei_c1222_mac_missing; /* Preferences */ static bool c1222_desegment = true; static bool c1222_decrypt = true; -static bool c1222_big_endian = false; -static const gchar *c1222_baseoid_str = NULL; -static guint8 *c1222_baseoid = NULL; -static guint c1222_baseoid_len = 0; +static bool c1222_big_endian; +static const gchar *c1222_baseoid_str; +static guint8 *c1222_baseoid; +static guint c1222_baseoid_len; /*------------------------------ * Data Structures @@ -304,8 +304,8 @@ typedef struct _c1222_uat_data { UAT_HEX_CB_DEF(c1222_users, keynum, c1222_uat_data_t) UAT_BUFFER_CB_DEF(c1222_users, key, c1222_uat_data_t, key, keylen) -static c1222_uat_data_t *c1222_uat_data = NULL; -static guint num_c1222_uat_data = 0; +static c1222_uat_data_t *c1222_uat_data; +static guint num_c1222_uat_data; static uat_t *c1222_uat; /* these macros ares used to populate fields needed to verify crypto */ diff --git a/epan/dissectors/asn1/camel/packet-camel-template.c b/epan/dissectors/asn1/camel/packet-camel-template.c index 565789cd96..6152578492 100644 --- a/epan/dissectors/asn1/camel/packet-camel-template.c +++ b/epan/dissectors/asn1/camel/packet-camel-template.c @@ -54,7 +54,7 @@ static int camel_tap; /* Global variables */ static guint32 opcode=0; static guint32 errorCode=0; -static guint32 camel_ver = 0; +static guint32 camel_ver; /* When several Camel components are received in a single TCAP message, we have to use several buffers for the stored parameters @@ -165,11 +165,11 @@ static dissector_handle_t camel_v4_handle; static guint8 PDPTypeOrganization; static guint8 PDPTypeNumber; -const char *camel_obj_id = NULL; -gboolean is_ExtensionField =FALSE; +const char *camel_obj_id; +gboolean is_ExtensionField; /* Global hash tables*/ -static wmem_map_t *srt_calls = NULL; +static wmem_map_t *srt_calls; static guint32 camelsrt_global_SessionId=1; static int camel_opcode_type; @@ -1053,8 +1053,8 @@ camelsrt_razinfo(void) } -static guint8 camel_pdu_type = 0; -static guint8 camel_pdu_size = 0; +static guint8 camel_pdu_type; +static guint8 camel_pdu_size; static int diff --git a/epan/dissectors/asn1/cdt/packet-cdt-template.c b/epan/dissectors/asn1/cdt/packet-cdt-template.c index 7820380c13..b954768481 100644 --- a/epan/dissectors/asn1/cdt/packet-cdt-template.c +++ b/epan/dissectors/asn1/cdt/packet-cdt-template.c @@ -38,10 +38,10 @@ void proto_register_cdt(void); void proto_reg_handoff_cdt(void); -static proto_tree *top_tree = NULL; -static proto_item *cdt_item = NULL; +static proto_tree *top_tree; +static proto_item *cdt_item; -static guint32 content_type = 0; +static guint32 content_type; /* Initialize the protocol and registered fields */ static int proto_cdt; diff --git a/epan/dissectors/asn1/cmip/packet-cmip-template.c b/epan/dissectors/asn1/cmip/packet-cmip-template.c index 4e7a249493..45feb39f0c 100644 --- a/epan/dissectors/asn1/cmip/packet-cmip-template.c +++ b/epan/dissectors/asn1/cmip/packet-cmip-template.c @@ -50,7 +50,7 @@ static expert_field ei_wrong_spdu_type; static guint32 opcode; -static dissector_handle_t cmip_handle = NULL; +static dissector_handle_t cmip_handle; /* Dissector table */ static dissector_table_t attribute_id_dissector_table; diff --git a/epan/dissectors/asn1/cmp/packet-cmp-template.c b/epan/dissectors/asn1/cmp/packet-cmp-template.c index 1a2b6e7563..028daa546c 100644 --- a/epan/dissectors/asn1/cmp/packet-cmp-template.c +++ b/epan/dissectors/asn1/cmp/packet-cmp-template.c @@ -44,8 +44,8 @@ static dissector_handle_t cmp_tcp_handle; /* desegmentation of CMP over TCP */ static bool cmp_desegment = true; -static guint cmp_alternate_http_port = 0; -static guint cmp_alternate_tcp_style_http_port = 0; +static guint cmp_alternate_http_port; +static guint cmp_alternate_tcp_style_http_port; /* Initialize the protocol and registered fields */ static int proto_cmp; diff --git a/epan/dissectors/asn1/cms/packet-cms-template.c b/epan/dissectors/asn1/cms/packet-cms-template.c index fb3b3a316f..52ff168fa0 100644 --- a/epan/dissectors/asn1/cms/packet-cms-template.c +++ b/epan/dissectors/asn1/cms/packet-cms-template.c @@ -43,7 +43,7 @@ static int hf_cms_ci_contentType; static gint ett_cms; #include "packet-cms-ett.c" -static dissector_handle_t cms_handle = NULL; +static dissector_handle_t cms_handle; static int dissect_cms_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2wrs stops generating these silly wrappers */ @@ -52,8 +52,8 @@ struct cms_private_data { tvbuff_t *content_tvb; }; -static proto_tree *top_tree=NULL; -static proto_tree *cap_tree=NULL; +static proto_tree *top_tree; +static proto_tree *cap_tree; #define HASH_SHA1 "1.3.14.3.2.26" diff --git a/epan/dissectors/asn1/disp/packet-disp-template.c b/epan/dissectors/asn1/disp/packet-disp-template.c index 6b8091a897..efd12fb15e 100644 --- a/epan/dissectors/asn1/disp/packet-disp-template.c +++ b/epan/dissectors/asn1/disp/packet-disp-template.c @@ -57,7 +57,7 @@ static expert_field ei_disp_unsupported_errcode; static expert_field ei_disp_unsupported_pdu; static expert_field ei_disp_zero_pdu; -static dissector_handle_t disp_handle = NULL; +static dissector_handle_t disp_handle; #include "packet-disp-fn.c" diff --git a/epan/dissectors/asn1/dop/packet-dop-template.c b/epan/dissectors/asn1/dop/packet-dop-template.c index 8182586832..f2ce04aa18 100644 --- a/epan/dissectors/asn1/dop/packet-dop-template.c +++ b/epan/dissectors/asn1/dop/packet-dop-template.c @@ -41,7 +41,7 @@ void proto_reg_handoff_dop(void); /* Initialize the protocol and registered fields */ static int proto_dop; -static const char *binding_type = NULL; /* binding_type */ +static const char *binding_type; /* binding_type */ static int call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char *col_info, void* data); @@ -58,7 +58,7 @@ static expert_field ei_dop_unsupported_errcode; static expert_field ei_dop_unsupported_pdu; static expert_field ei_dop_zero_pdu; -static dissector_handle_t dop_handle = NULL; +static dissector_handle_t dop_handle; /* Dissector table */ static dissector_table_t dop_dissector_table; diff --git a/epan/dissectors/asn1/e2ap/packet-e2ap-template.c b/epan/dissectors/asn1/e2ap/packet-e2ap-template.c index eba49213dd..2e3ee14c1a 100644 --- a/epan/dissectors/asn1/e2ap/packet-e2ap-template.c +++ b/epan/dissectors/asn1/e2ap/packet-e2ap-template.c @@ -182,7 +182,7 @@ static const value_string mtype_names[] = { { 0, NULL } }; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static void set_message_label(asn1_ctx_t *actx, int type) { diff --git a/epan/dissectors/asn1/f1ap/packet-f1ap-template.c b/epan/dissectors/asn1/f1ap/packet-f1ap-template.c index d8b9d6fb06..cbbf4c916d 100644 --- a/epan/dissectors/asn1/f1ap/packet-f1ap-template.c +++ b/epan/dissectors/asn1/f1ap/packet-f1ap-template.c @@ -493,7 +493,7 @@ static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, pro static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static void set_message_label(asn1_ctx_t *actx, int type) { diff --git a/epan/dissectors/asn1/gdt/packet-gdt-template.c b/epan/dissectors/asn1/gdt/packet-gdt-template.c index 700ac5763c..0bbe28db1a 100644 --- a/epan/dissectors/asn1/gdt/packet-gdt-template.c +++ b/epan/dissectors/asn1/gdt/packet-gdt-template.c @@ -29,7 +29,7 @@ /* Initialize the protocol and registered fields */ static int proto_gdt; -static dissector_handle_t gdt_handle = NULL; +static dissector_handle_t gdt_handle; #include "packet-gdt-hf.c" diff --git a/epan/dissectors/asn1/glow/packet-glow-template.c b/epan/dissectors/asn1/glow/packet-glow-template.c index 0f39fbc8e9..f290dd1f31 100644 --- a/epan/dissectors/asn1/glow/packet-glow-template.c +++ b/epan/dissectors/asn1/glow/packet-glow-template.c @@ -22,7 +22,7 @@ void proto_register_glow(void); -static dissector_handle_t glow_handle=NULL; +static dissector_handle_t glow_handle; static int proto_glow; #include "packet-glow-hf.c" diff --git a/epan/dissectors/asn1/goose/packet-goose-template.c b/epan/dissectors/asn1/goose/packet-goose-template.c index ad03235ccc..95cbbd422b 100644 --- a/epan/dissectors/asn1/goose/packet-goose-template.c +++ b/epan/dissectors/asn1/goose/packet-goose-template.c @@ -104,7 +104,7 @@ static int ett_expert_inf_sim; #include "packet-goose-fn.c" -static dissector_handle_t goose_handle = NULL; +static dissector_handle_t goose_handle; #define OSI_SPDU_TUNNELED 0xA0 /* Tunneled */ diff --git a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c index 595bebd653..3431d4545b 100644 --- a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c +++ b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c @@ -50,7 +50,7 @@ static expert_field ei_gprscdr_not_dissected; static expert_field ei_gprscdr_choice_not_found; /* Global variables */ -static const char *obj_id = NULL; +static const char *obj_id; static const value_string gprscdr_daylight_saving_time_vals[] = { {0, "No adjustment"}, diff --git a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c index 8eef33fe60..32038bfe5f 100644 --- a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c +++ b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c @@ -206,7 +206,7 @@ static dissector_table_t map_prop_err_opcode_table; /* proprietary operat static range_t *global_ssn_range; #define APPLICATON_CONTEXT_FROM_TRACE 0 static gint pref_application_context_version = APPLICATON_CONTEXT_FROM_TRACE; -static bool pref_ericsson_proprietary_ext = false; +static bool pref_ericsson_proprietary_ext; /* Global variables */ static guint32 opcode=0; @@ -215,8 +215,8 @@ static int application_context_version; static guint ProtocolId; static guint AccessNetworkProtocolId; static int gsm_map_tap; -static guint8 gsmmap_pdu_type = 0; -static guint8 gsm_map_pdu_size = 0; +static guint8 gsmmap_pdu_type; +static guint8 gsm_map_pdu_size; #define SMS_ENCODING_NOT_SET 0 #define SMS_ENCODING_7BIT 1 diff --git a/epan/dissectors/asn1/h225/packet-h225-template.c b/epan/dissectors/asn1/h225/packet-h225-template.c index e2f90ad46e..cb5886121a 100644 --- a/epan/dissectors/asn1/h225/packet-h225-template.c +++ b/epan/dissectors/asn1/h225/packet-h225-template.c @@ -74,7 +74,7 @@ typedef struct _h225ras_call_info_key { /* Global Memory Chunks for lists and Global hash tables*/ -static wmem_map_t *ras_calls[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; +static wmem_map_t *ras_calls[7]; /* functions, needed using ras-request and halfcall matching*/ static h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category); @@ -92,9 +92,9 @@ static dissector_table_t gef_name_dissector_table; static dissector_table_t gef_content_dissector_table; -static dissector_handle_t h245_handle=NULL; -static dissector_handle_t h245dg_handle=NULL; -static dissector_handle_t h4501_handle=NULL; +static dissector_handle_t h245_handle; +static dissector_handle_t h245dg_handle; +static dissector_handle_t h4501_handle; static dissector_handle_t nsp_handle; static dissector_handle_t tp_handle; @@ -130,7 +130,7 @@ static guint32 ipv4_address; static ws_in6_addr ipv6_address; static ws_in6_addr ipv6_address_zeros = {{0}}; static guint32 ip_port; -static gboolean contains_faststart = FALSE; +static gboolean contains_faststart; static e_guid_t *call_id_guid; /* NonStandardParameter */ diff --git a/epan/dissectors/asn1/h245/packet-h245-template.c b/epan/dissectors/asn1/h245/packet-h245-template.c index a94417fbbb..df091aa7c7 100644 --- a/epan/dissectors/asn1/h245/packet-h245-template.c +++ b/epan/dissectors/asn1/h245/packet-h245-template.c @@ -46,7 +46,7 @@ void proto_register_h245(void); void proto_reg_handoff_h245(void); -static dissector_handle_t rtcp_handle=NULL; +static dissector_handle_t rtcp_handle; static dissector_table_t nsp_object_dissector_table; static dissector_table_t nsp_h221_dissector_table; static dissector_table_t gef_name_dissector_table; @@ -55,8 +55,8 @@ static dissector_handle_t h245_handle; static dissector_handle_t nsp_handle; static dissector_handle_t data_handle; static dissector_handle_t MultimediaSystemControlMessage_handle; -static dissector_handle_t h263_handle = NULL; -static dissector_handle_t amr_handle = NULL; +static dissector_handle_t h263_handle; +static dissector_handle_t amr_handle; static void init_h245_packet_info(h245_packet_info *pi); static int hf_h245_pdu_type; @@ -69,8 +69,8 @@ static int hf_h245_debug_dissector_try_string; h245_packet_info *h245_pi=NULL; static bool h245_reassembly = true; -static bool h245_shorttypes = false; -static bool info_col_fmt_prepend = false; +static bool h245_shorttypes; +static bool info_col_fmt_prepend; #include "packet-h245-val.h" @@ -196,7 +196,7 @@ static const value_string h245_AudioCapability_short_vals[] = { /* To put the codec type only in COL_INFO when an OLC is read */ -const char* codec_type = NULL; +const char* codec_type; static guint32 rfc_number; typedef struct _unicast_addr_t { @@ -221,10 +221,10 @@ typedef struct _olc_info_t { channel_info_t rev_lc; } olc_info_t; -static wmem_map_t* h245_pending_olc_reqs = NULL; -static gboolean fast_start = FALSE; -static olc_info_t *upcoming_olc = NULL; -static channel_info_t *upcoming_channel = NULL; +static wmem_map_t* h245_pending_olc_reqs; +static gboolean fast_start; +static olc_info_t *upcoming_olc; +static channel_info_t *upcoming_channel; /* NonStandardParameter */ static const char *nsiOID; @@ -256,7 +256,7 @@ static const value_string h245_h239subMessageIdentifier_vals[] = { /* h223 multiplex codes */ -static h223_set_mc_handle_t h223_set_mc_handle = NULL; +static h223_set_mc_handle_t h223_set_mc_handle; h223_mux_element *h223_me=NULL; guint8 h223_mc=0; void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ) @@ -270,7 +270,7 @@ typedef struct { h223_lc_params *rev_channel_params; } h223_pending_olc; -static wmem_map_t* h223_pending_olc_reqs[] = { NULL, NULL }; +static wmem_map_t* h223_pending_olc_reqs[2]; static dissector_handle_t h245_lc_dissector; static guint16 h245_lc_temp; static guint16 h223_fw_lc_num; @@ -278,7 +278,7 @@ static guint16 h223_rev_lc_num; static h223_lc_params *h223_lc_params_temp; static h223_lc_params *h223_fw_lc_params; static h223_lc_params *h223_rev_lc_params; -static h223_add_lc_handle_t h223_add_lc_handle = NULL; +static h223_add_lc_handle_t h223_add_lc_handle; static void h223_lc_init( void ) { diff --git a/epan/dissectors/asn1/h248/packet-h248-template.c b/epan/dissectors/asn1/h248/packet-h248-template.c index f5c9ded13a..2e5c84d9c9 100644 --- a/epan/dissectors/asn1/h248/packet-h248-template.c +++ b/epan/dissectors/asn1/h248/packet-h248-template.c @@ -132,10 +132,10 @@ const value_string gcp_term_types[] = { { 0, NULL } }; -static wmem_tree_t* gcp_msgs = NULL; -static wmem_tree_t* gcp_trxs = NULL; -static wmem_tree_t* gcp_ctxs_by_trx = NULL; -static wmem_tree_t* gcp_ctxs = NULL; +static wmem_tree_t* gcp_msgs; +static wmem_tree_t* gcp_trxs; +static wmem_tree_t* gcp_ctxs_by_trx; +static wmem_tree_t* gcp_ctxs; gcp_msg_t* gcp_msg(packet_info* pinfo, int o, gboolean keep_persistent_data) { gcp_msg_t* m; @@ -832,7 +832,7 @@ void gcp_analyze_msg(proto_tree* gcp_tree, packet_info* pinfo, tvbuff_t* gcp_tvb /* END Gateway Control Protocol -- Context Tracking */ #define H248_PORT 2945 -static bool keep_persistent_data = false; +static bool keep_persistent_data; static bool h248_desegment = true; @@ -1420,9 +1420,9 @@ static const value_string wildcard_levels[] = { { 0, NULL } }; -static h248_curr_info_t curr_info = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; +static h248_curr_info_t curr_info; static guint32 error_code; -static guint32 h248_version = 0; /* h248v1 support */ +static guint32 h248_version; /* h248v1 support */ static gcp_wildcard_t wild_term; static guint8 wild_card = 0xFF; /* place to store wildcardField */ @@ -1490,7 +1490,7 @@ static const h248_pkg_param_t no_param = { 0, &hf_h248_param, h248_param_uint_it static const h248_pkg_evt_t no_event = { 0, &hf_h248_no_evt, &ett_h248_no_evt, NULL, NULL }; static const h248_package_t *find_package_id(guint16 pkgid); -static wmem_tree_t* packages = NULL; +static wmem_tree_t* packages; extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u1 _U_, void* u2 _U_) { tvbuff_t *new_tvb = NULL; diff --git a/epan/dissectors/asn1/h450-ros/packet-h450-ros-template.c b/epan/dissectors/asn1/h450-ros/packet-h450-ros-template.c index 792159b836..da1a3ffd8f 100644 --- a/epan/dissectors/asn1/h450-ros/packet-h450-ros-template.c +++ b/epan/dissectors/asn1/h450-ros/packet-h450-ros-template.c @@ -38,7 +38,7 @@ static expert_field ei_ros_undecoded; /* Preferences */ /* Subdissectors */ -static dissector_handle_t data_handle = NULL; +static dissector_handle_t data_handle; /* Global variables */ static gint32 problem_val; diff --git a/epan/dissectors/asn1/h460/packet-h460-template.c b/epan/dissectors/asn1/h460/packet-h460-template.c index 3a3f819279..016446715c 100644 --- a/epan/dissectors/asn1/h460/packet-h460-template.c +++ b/epan/dissectors/asn1/h460/packet-h460-template.c @@ -38,8 +38,8 @@ static int proto_h460; static dissector_handle_t h460_name_handle; /* Subdissectors */ -static dissector_handle_t q931_ie_handle = NULL; -static dissector_handle_t h225_ras_handle = NULL; +static dissector_handle_t q931_ie_handle; +static dissector_handle_t h225_ras_handle; #include "packet-h460-fn.c" diff --git a/epan/dissectors/asn1/idmp/packet-idmp-template.c b/epan/dissectors/asn1/idmp/packet-idmp-template.c index efa271348b..6f5abe8147 100644 --- a/epan/dissectors/asn1/idmp/packet-idmp-template.c +++ b/epan/dissectors/asn1/idmp/packet-idmp-template.c @@ -40,11 +40,11 @@ void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int p static bool idmp_desegment = true; #define IDMP_TCP_PORT 1102 /* made up for now - not IANA registered */ static bool idmp_reassemble = true; -static dissector_handle_t idmp_handle = NULL; +static dissector_handle_t idmp_handle; -static proto_tree *top_tree = NULL; -static const char *protocolID = NULL; -static const char *saved_protocolID = NULL; +static proto_tree *top_tree; +static const char *protocolID; +static const char *saved_protocolID; static guint32 opcode = -1; /* Initialize the protocol and registered fields */ diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c index 3baddbf1cd..d4f176e127 100644 --- a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c +++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c @@ -36,7 +36,7 @@ void proto_reg_handoff_ieee1609dot2(void); /* Initialize the protocol and registered fields */ int proto_ieee1609dot2; -dissector_handle_t proto_ieee1609dot2_handle = NULL; +dissector_handle_t proto_ieee1609dot2_handle; #include "packet-ieee1609dot2-hf.c" /* Initialize the subtree pointers */ diff --git a/epan/dissectors/asn1/inap/packet-inap-template.c b/epan/dissectors/asn1/inap/packet-inap-template.c index 8334aaea03..61101c57e2 100644 --- a/epan/dissectors/asn1/inap/packet-inap-template.c +++ b/epan/dissectors/asn1/inap/packet-inap-template.c @@ -53,8 +53,8 @@ static dissector_handle_t inap_handle; /* Global variables */ static guint32 opcode=0; static guint32 errorCode=0; -static const char *obj_id = NULL; -static gboolean is_ExtensionField =FALSE; +static const char *obj_id; +static gboolean is_ExtensionField; static int inap_opcode_type; #define INAP_OPCODE_INVOKE 1 @@ -133,8 +133,8 @@ TC-Invokable OPERATION ::= #include "packet-inap-table2.c" -static guint8 inap_pdu_type = 0; -static guint8 inap_pdu_size = 0; +static guint8 inap_pdu_type; +static guint8 inap_pdu_size; static int diff --git a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c index 5b428c97ef..b268263b23 100644 --- a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c +++ b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c @@ -354,7 +354,7 @@ static expert_field ei_kerberos_learnt_keytype; static expert_field ei_kerberos_address; static expert_field ei_krb_gssapi_dlglen; -static dissector_handle_t krb4_handle=NULL; +static dissector_handle_t krb4_handle; /* Global variables */ static guint32 gbl_keytype; @@ -460,7 +460,7 @@ static int dissect_kerberos_defer_PA_FX_FAST_REQUEST(bool implicit_tag _U_, tvbu #ifdef HAVE_KERBEROS /* Decrypt Kerberos blobs */ -bool krb_decrypt = false; +bool krb_decrypt; /* keytab filename */ static const char *keytab_filename = ""; @@ -491,10 +491,10 @@ read_keytab_file_from_preferences(void) #if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS) enc_key_t *enc_key_list=NULL; -static guint kerberos_longterm_ids = 0; -wmem_map_t *kerberos_longterm_keys = NULL; -static wmem_map_t *kerberos_all_keys = NULL; -static wmem_map_t *kerberos_app_session_keys = NULL; +static guint kerberos_longterm_ids; +wmem_map_t *kerberos_longterm_keys; +static wmem_map_t *kerberos_all_keys; +static wmem_map_t *kerberos_app_session_keys; static bool enc_key_list_cb(wmem_allocator_t* allocator _U_, wmem_cb_event_t event _U_, void *user_data _U_) @@ -2751,7 +2751,7 @@ typedef struct _service_key_t { guint8 *contents; char origin[KRB_MAX_ORIG_LEN+1]; } service_key_t; -GSList *service_key_list = NULL; +GSList *service_key_list; static void diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c index c116f5d919..20aac9cc1f 100644 --- a/epan/dissectors/asn1/ldap/packet-ldap-template.c +++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c @@ -201,13 +201,13 @@ static gint ett_ldap_DirSyncFlagsSubEntry; static expert_field ei_ldap_exceeded_filter_length; static expert_field ei_ldap_too_many_filter_elements; -static dissector_table_t ldap_name_dissector_table=NULL; -static const char *object_identifier_id = NULL; /* LDAP OID */ +static dissector_table_t ldap_name_dissector_table; +static const char *object_identifier_id; /* LDAP OID */ -static gboolean do_protocolop = FALSE; -static gchar *attr_type = NULL; -static gboolean is_binary_attr_type = FALSE; -static gboolean ldap_found_in_frame = FALSE; +static gboolean do_protocolop; +static gchar *attr_type; +static gboolean is_binary_attr_type; +static gboolean ldap_found_in_frame; #define TCP_PORT_RANGE_LDAP "389,3268" /* 3268 is Windows 2000 Global Catalog */ #define TCP_PORT_LDAPS 636 @@ -216,7 +216,7 @@ static gboolean ldap_found_in_frame = FALSE; /* desegmentation of LDAP */ static bool ldap_desegment = true; static guint global_ldaps_tcp_port = TCP_PORT_LDAPS; -static guint ssl_port = 0; +static guint ssl_port; static dissector_handle_t gssapi_handle; static dissector_handle_t gssapi_wrap_handle; @@ -625,10 +625,10 @@ static int dissect_mscldap_ntver_flags(proto_tree *parent_tree, tvbuff_t *tvb, i } /* This string contains the last LDAPString that was decoded */ -static const char *attributedesc_string=NULL; +static const char *attributedesc_string; /* This string contains the last AssertionValue that was decoded */ -static char *ldapvalue_string=NULL; +static char *ldapvalue_string; /* if the octet string contain all printable ASCII characters, then * display it as a string, othervise just display it in hex. @@ -734,14 +734,14 @@ finished: } /* This string contains the last Filter item that was decoded */ -static const char *Filter_string=NULL; -static const char *and_filter_string=NULL; -static const char *or_filter_string=NULL; -static const char *substring_value=NULL; -static const char *substring_item_init=NULL; -static const char *substring_item_any=NULL; -static const char *substring_item_final=NULL; -static const char *matching_rule_string=NULL; +static const char *Filter_string; +static const char *and_filter_string; +static const char *or_filter_string; +static const char *substring_value; +static const char *substring_item_init; +static const char *substring_item_any; +static const char *substring_item_final; +static const char *matching_rule_string; static gboolean matching_rule_dnattr=FALSE; #define MAX_FILTER_LEN 4096 @@ -753,8 +753,8 @@ static gint Filter_elements; /* Global variables */ static gint MessageID =-1; static gint ProtocolOp = -1; -static gint result = 0; -static proto_item *ldm_tree = NULL; /* item to add text to */ +static gint result; +static proto_item *ldm_tree; /* item to add text to */ static void ldap_do_protocolop(packet_info *pinfo) { diff --git a/epan/dissectors/asn1/lix2/packet-lix2-template.c b/epan/dissectors/asn1/lix2/packet-lix2-template.c index d12b3282e3..8c8af3c8b5 100644 --- a/epan/dissectors/asn1/lix2/packet-lix2-template.c +++ b/epan/dissectors/asn1/lix2/packet-lix2-template.c @@ -27,7 +27,7 @@ void proto_register_lix2(void); /* Initialize the protocol and registered fields */ static int proto_lix2; -static dissector_handle_t lix2_handle = NULL; +static dissector_handle_t lix2_handle; #include "packet-lix2-hf.c" diff --git a/epan/dissectors/asn1/lpp/packet-lpp-template.c b/epan/dissectors/asn1/lpp/packet-lpp-template.c index bd5c75dbc9..aeed110912 100644 --- a/epan/dissectors/asn1/lpp/packet-lpp-template.c +++ b/epan/dissectors/asn1/lpp/packet-lpp-template.c @@ -46,7 +46,7 @@ static int hf_lpp_bdsSvHealth_r12_b2i; static int hf_lpp_bdsSvHealth_r12_nav; static int hf_lpp_AssistanceDataSIBelement_r15_PDU; -static dissector_handle_t lppe_handle = NULL; +static dissector_handle_t lppe_handle; static guint32 lpp_epdu_id = -1; diff --git a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c index 976aaefecf..e1f7f2d18c 100644 --- a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c @@ -48,20 +48,20 @@ void proto_register_lte_rrc(void); void proto_reg_handoff_lte_rrc(void); -static dissector_handle_t nas_eps_handle = NULL; -static dissector_handle_t nas_5gs_handle = NULL; -static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL; -static dissector_handle_t rrc_sys_info_cont_handle = NULL; -static dissector_handle_t gsm_a_dtap_handle = NULL; -static dissector_handle_t gsm_rlcmac_dl_handle = NULL; -static dissector_handle_t nr_rrc_reconf_handle = NULL; +static dissector_handle_t nas_eps_handle; +static dissector_handle_t nas_5gs_handle; +static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle; +static dissector_handle_t rrc_sys_info_cont_handle; +static dissector_handle_t gsm_a_dtap_handle; +static dissector_handle_t gsm_rlcmac_dl_handle; +static dissector_handle_t nr_rrc_reconf_handle; static dissector_handle_t lte_rrc_conn_reconf_handle; static dissector_handle_t lte_rrc_dl_ccch_handle; -static wmem_map_t *lte_rrc_etws_cmas_dcs_hash = NULL; +static wmem_map_t *lte_rrc_etws_cmas_dcs_hash; /* Keep track of where/how the System Info value has changed */ -static wmem_map_t *lte_rrc_system_info_value_changed_hash = NULL; +static wmem_map_t *lte_rrc_system_info_value_changed_hash; static guint8 system_info_value_current; static gboolean system_info_value_current_set; diff --git a/epan/dissectors/asn1/m3ap/packet-m3ap-template.c b/epan/dissectors/asn1/m3ap/packet-m3ap-template.c index 5718898825..a4a53101d9 100644 --- a/epan/dissectors/asn1/m3ap/packet-m3ap-template.c +++ b/epan/dissectors/asn1/m3ap/packet-m3ap-template.c @@ -34,7 +34,7 @@ void proto_reg_handoff_m3ap(void); /* M3AP uses port 36444 as recommended by IANA. */ #define M3AP_PORT 36444 -static dissector_handle_t m3ap_handle=NULL; +static dissector_handle_t m3ap_handle; #include "packet-m3ap-val.h" diff --git a/epan/dissectors/asn1/nbap/packet-nbap-template.c b/epan/dissectors/asn1/nbap/packet-nbap-template.c index 2d5ee5e866..f17f1fb024 100644 --- a/epan/dissectors/asn1/nbap/packet-nbap-template.c +++ b/epan/dissectors/asn1/nbap/packet-nbap-template.c @@ -294,9 +294,9 @@ static void nbap_reset_private_data(packet_info *pinfo) /* Variables for sub elements dissection */ static const gchar *ProcedureID; /* Trees */ -static wmem_tree_t* edch_flow_port_map = NULL; -wmem_tree_t *nbap_scrambling_code_crncc_map = NULL; -wmem_tree_t *nbap_crncc_urnti_map = NULL; +static wmem_tree_t* edch_flow_port_map; +wmem_tree_t *nbap_scrambling_code_crncc_map; +wmem_tree_t *nbap_crncc_urnti_map; static wmem_tree_t* com_context_map; /* This table is used externally from FP, MAC and such, TODO: merge this with diff --git a/epan/dissectors/asn1/ngap/packet-ngap-template.c b/epan/dissectors/asn1/ngap/packet-ngap-template.c index b17bf1550c..d3004caa3d 100644 --- a/epan/dissectors/asn1/ngap/packet-ngap-template.c +++ b/epan/dissectors/asn1/ngap/packet-ngap-template.c @@ -536,7 +536,7 @@ static const enum_val_t ngap_lte_container_vals[] = { }; /* Global variables */ -static range_t *gbl_ngapSctpRange = NULL; +static range_t *gbl_ngapSctpRange; static bool ngap_dissect_container = true; static gint ngap_dissect_target_ng_ran_container_as = NGAP_NG_RAN_CONTAINER_AUTOMATIC; static gint ngap_dissect_lte_container_as = NGAP_LTE_CONTAINER_AUTOMATIC; @@ -551,7 +551,7 @@ static dissector_table_t ngap_proc_sout_dissector_table; static dissector_table_t ngap_proc_uout_dissector_table; static dissector_table_t ngap_n2_ie_type_dissector_table; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static void set_message_label(asn1_ctx_t *actx, int type) { diff --git a/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c b/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c index 9bc18ad62b..82bbe8c606 100644 --- a/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c +++ b/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c @@ -46,13 +46,13 @@ void proto_register_nr_rrc(void); void proto_reg_handoff_nr_rrc(void); -static dissector_handle_t nas_5gs_handle = NULL; -static dissector_handle_t lte_rrc_conn_reconf_handle = NULL; -static dissector_handle_t lte_rrc_conn_reconf_compl_handle = NULL; -static dissector_handle_t lte_rrc_ul_dcch_handle = NULL; -static dissector_handle_t lte_rrc_dl_dcch_handle = NULL; +static dissector_handle_t nas_5gs_handle; +static dissector_handle_t lte_rrc_conn_reconf_handle; +static dissector_handle_t lte_rrc_conn_reconf_compl_handle; +static dissector_handle_t lte_rrc_ul_dcch_handle; +static dissector_handle_t lte_rrc_dl_dcch_handle; -static wmem_map_t *nr_rrc_etws_cmas_dcs_hash = NULL; +static wmem_map_t *nr_rrc_etws_cmas_dcs_hash; static reassembly_table nr_rrc_sib7_reassembly_table; static reassembly_table nr_rrc_sib8_reassembly_table; diff --git a/epan/dissectors/asn1/p7/packet-p7-template.c b/epan/dissectors/asn1/p7/packet-p7-template.c index 04851e18f9..83940f0313 100644 --- a/epan/dissectors/asn1/p7/packet-p7-template.c +++ b/epan/dissectors/asn1/p7/packet-p7-template.c @@ -33,7 +33,7 @@ void proto_register_p7(void); void proto_reg_handoff_p7(void); -static int seqno = 0; +static int seqno; /* Initialize the protocol and registered fields */ static int proto_p7; diff --git a/epan/dissectors/asn1/pcap/packet-pcap-template.c b/epan/dissectors/asn1/pcap/packet-pcap-template.c index 779924c552..5eb71b6212 100644 --- a/epan/dissectors/asn1/pcap/packet-pcap-template.c +++ b/epan/dissectors/asn1/pcap/packet-pcap-template.c @@ -42,7 +42,7 @@ void proto_reg_handoff_pcap(void); #include "packet-pcap-val.h" -static dissector_handle_t pcap_handle = NULL; +static dissector_handle_t pcap_handle; /* Initialize the protocol and registered fields */ static int proto_pcap; diff --git a/epan/dissectors/asn1/pkcs12/packet-pkcs12-template.c b/epan/dissectors/asn1/pkcs12/packet-pkcs12-template.c index 8293677f5c..bd06151d1a 100644 --- a/epan/dissectors/asn1/pkcs12/packet-pkcs12-template.c +++ b/epan/dissectors/asn1/pkcs12/packet-pkcs12-template.c @@ -50,11 +50,11 @@ static gint ett_decrypted_pbe; static expert_field ei_pkcs12_octet_string_expected; -static const char *object_identifier_id = NULL; -static int iteration_count = 0; -static tvbuff_t *salt = NULL; -static const char *password = NULL; -static bool try_null_password = false; +static const char *object_identifier_id; +static int iteration_count; +static tvbuff_t *salt; +static const char *password; +static bool try_null_password; static int dissect_AuthenticatedSafe_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data); static int dissect_SafeContents_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data); diff --git a/epan/dissectors/asn1/pres/packet-pres-template.c b/epan/dissectors/asn1/pres/packet-pres-template.c index 7edd95ad87..8e88177206 100644 --- a/epan/dissectors/asn1/pres/packet-pres-template.c +++ b/epan/dissectors/asn1/pres/packet-pres-template.c @@ -45,8 +45,8 @@ static int proto_pres; static int proto_clpres; /* pointers for acse dissector */ -proto_tree *global_tree = NULL; -packet_info *global_pinfo = NULL; +proto_tree *global_tree; +packet_info *global_pinfo; static const char *abstract_syntax_name_oid; static guint32 presentation_context_identifier; @@ -57,7 +57,7 @@ typedef struct _pres_ctx_oid_t { char *oid; guint32 idx; } pres_ctx_oid_t; -static wmem_map_t *pres_ctx_oid_table = NULL; +static wmem_map_t *pres_ctx_oid_table; typedef struct _pres_user_t { guint ctx_id; diff --git a/epan/dissectors/asn1/q932-ros/packet-q932-ros-template.c b/epan/dissectors/asn1/q932-ros/packet-q932-ros-template.c index fb148cbeea..20b6b20a63 100644 --- a/epan/dissectors/asn1/q932-ros/packet-q932-ros-template.c +++ b/epan/dissectors/asn1/q932-ros/packet-q932-ros-template.c @@ -37,7 +37,7 @@ static expert_field ei_ros_undecoded; /* Preferences */ /* Subdissectors */ -static dissector_handle_t data_handle = NULL; +static dissector_handle_t data_handle; /* Global variables */ static rose_ctx_t *rose_ctx_tmp; diff --git a/epan/dissectors/asn1/qsig/packet-qsig-template.c b/epan/dissectors/asn1/qsig/packet-qsig-template.c index 54deedf269..3052174e77 100644 --- a/epan/dissectors/asn1/qsig/packet-qsig-template.c +++ b/epan/dissectors/asn1/qsig/packet-qsig-template.c @@ -311,10 +311,10 @@ static expert_field ei_qsig_unsupported_error_type; /* Preferences */ /* Subdissectors */ -static dissector_handle_t q931_ie_handle = NULL; +static dissector_handle_t q931_ie_handle; /* Global variables */ -static const char *extension_oid = NULL; +static const char *extension_oid; /* Dissector tables */ static dissector_table_t extension_dissector_table; diff --git a/epan/dissectors/asn1/ranap/packet-ranap-template.c b/epan/dissectors/asn1/ranap/packet-ranap-template.c index c037f44d92..f41ce91c98 100644 --- a/epan/dissectors/asn1/ranap/packet-ranap-template.c +++ b/epan/dissectors/asn1/ranap/packet-ranap-template.c @@ -54,10 +54,10 @@ void proto_reg_handoff_ranap(void); static int proto_ranap; /* initialise sub-dissector handles */ -static dissector_handle_t rrc_s_to_trnc_handle = NULL; -static dissector_handle_t rrc_t_to_srnc_handle = NULL; -static dissector_handle_t rrc_ho_to_utran_cmd = NULL; -static dissector_handle_t bssgp_handle = NULL; +static dissector_handle_t rrc_s_to_trnc_handle; +static dissector_handle_t rrc_t_to_srnc_handle; +static dissector_handle_t rrc_ho_to_utran_cmd; +static dissector_handle_t bssgp_handle; static int hf_ranap_transportLayerAddress_ipv4; static int hf_ranap_transportLayerAddress_ipv6; @@ -136,7 +136,7 @@ static void private_data_set_binding_id_port(asn1_ctx_t *actx, guint16 binding_i static guint32 ProcedureCode; static guint32 ProtocolIE_ID; static guint32 ProtocolExtensionID; -static bool glbl_dissect_container = false; +static bool glbl_dissect_container; static dissector_handle_t ranap_handle; @@ -163,7 +163,7 @@ static dissector_handle_t ranap_handle; #define SOUT (2U<<16) #define SPECIAL (4U<<16) -int pdu_type = 0; /* 0 means wildcard */ +int pdu_type; /* 0 means wildcard */ /* Dissector tables */ static dissector_table_t ranap_ies_dissector_table; diff --git a/epan/dissectors/asn1/rnsap/packet-rnsap-template.c b/epan/dissectors/asn1/rnsap/packet-rnsap-template.c index 276e642d1b..a16abcb24b 100644 --- a/epan/dissectors/asn1/rnsap/packet-rnsap-template.c +++ b/epan/dissectors/asn1/rnsap/packet-rnsap-template.c @@ -49,9 +49,9 @@ typedef struct { const char *obj_id; } rnsap_private_data_t; -static dissector_handle_t ranap_handle = NULL; -static dissector_handle_t rrc_dl_ccch_handle = NULL; -static dissector_handle_t rrc_ul_ccch_handle = NULL; +static dissector_handle_t ranap_handle; +static dissector_handle_t rrc_dl_ccch_handle; +static dissector_handle_t rrc_ul_ccch_handle; /* Initialize the protocol and registered fields */ static int proto_rnsap; diff --git a/epan/dissectors/asn1/ros/packet-ros-template.c b/epan/dissectors/asn1/ros/packet-ros-template.c index 69bf44b991..708e031bcd 100644 --- a/epan/dissectors/asn1/ros/packet-ros-template.c +++ b/epan/dissectors/asn1/ros/packet-ros-template.c @@ -30,11 +30,11 @@ void proto_reg_handoff_ros(void); /* Initialize the protocol and registered fields */ static int proto_ros; -static proto_tree *top_tree=NULL; +static proto_tree *top_tree; static guint32 opcode; static guint32 invokeid; -static dissector_handle_t ros_handle = NULL; +static dissector_handle_t ros_handle; typedef struct ros_conv_info_t { wmem_map_t *unmatched; /* unmatched operations */ @@ -72,9 +72,9 @@ static gint ett_ros_unbind_error; static expert_field ei_ros_dissector_oid_not_implemented; static expert_field ei_ros_unknown_ros_pdu; -static dissector_table_t ros_oid_dissector_table=NULL; +static dissector_table_t ros_oid_dissector_table; -static wmem_map_t *protocol_table=NULL; +static wmem_map_t *protocol_table; void register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_rtse) diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.c b/epan/dissectors/asn1/rrc/packet-rrc-template.c index 57eea79dbb..06603e2abb 100644 --- a/epan/dissectors/asn1/rrc/packet-rrc-template.c +++ b/epan/dissectors/asn1/rrc/packet-rrc-template.c @@ -52,9 +52,9 @@ extern int proto_fp; /*Handler to FP*/ extern int proto_umts_mac; /*Handler to MAC*/ extern int proto_umts_rlc; /*Handler to RLC*/ -GTree * hsdsch_muxed_flows = NULL; -GTree * rrc_ciph_info_tree = NULL; -wmem_tree_t* rrc_global_urnti_crnti_map = NULL; +GTree * hsdsch_muxed_flows; +GTree * rrc_ciph_info_tree; +wmem_tree_t* rrc_global_urnti_crnti_map; static int msg_type _U_; static bool rrc_nas_in_root_tree; @@ -289,16 +289,16 @@ static void private_data_set_curr_sib_type(asn1_ctx_t *actx, guint32 curr_sib_ty /*****************************************************************************/ static dissector_handle_t gsm_a_dtap_handle; -static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL; -static dissector_handle_t rrc_pcch_handle=NULL; -static dissector_handle_t rrc_ul_ccch_handle=NULL; -static dissector_handle_t rrc_dl_ccch_handle=NULL; -static dissector_handle_t rrc_ul_dcch_handle=NULL; -static dissector_handle_t rrc_dl_dcch_handle=NULL; -static dissector_handle_t rrc_bcch_fach_handle=NULL; -static dissector_handle_t lte_rrc_ue_eutra_cap_handle=NULL; -static dissector_handle_t lte_rrc_dl_dcch_handle=NULL; -static dissector_handle_t gsm_rlcmac_dl_handle=NULL; +static dissector_handle_t rrc_ue_radio_access_cap_info_handle; +static dissector_handle_t rrc_pcch_handle; +static dissector_handle_t rrc_ul_ccch_handle; +static dissector_handle_t rrc_dl_ccch_handle; +static dissector_handle_t rrc_ul_dcch_handle; +static dissector_handle_t rrc_dl_dcch_handle; +static dissector_handle_t rrc_bcch_fach_handle; +static dissector_handle_t lte_rrc_ue_eutra_cap_handle; +static dissector_handle_t lte_rrc_dl_dcch_handle; +static dissector_handle_t gsm_rlcmac_dl_handle; /* Forward declarations */ void proto_register_rrc(void); diff --git a/epan/dissectors/asn1/rtse/packet-rtse-template.c b/epan/dissectors/asn1/rtse/packet-rtse-template.c index 078074f487..33b35f786c 100644 --- a/epan/dissectors/asn1/rtse/packet-rtse-template.c +++ b/epan/dissectors/asn1/rtse/packet-rtse-template.c @@ -39,7 +39,7 @@ static int proto_rtse; static gboolean open_request=FALSE; static guint32 app_proto=0; -static proto_tree *top_tree=NULL; +static proto_tree *top_tree; /* Preferences */ static bool rtse_reassemble = true; @@ -54,8 +54,8 @@ static expert_field ei_rtse_dissector_oid_not_implemented; static expert_field ei_rtse_unknown_rtse_pdu; static expert_field ei_rtse_abstract_syntax; -static dissector_table_t rtse_oid_dissector_table=NULL; -static dissector_handle_t rtse_handle = NULL; +static dissector_table_t rtse_oid_dissector_table; +static dissector_handle_t rtse_handle; static gint ett_rtse_unknown; static reassembly_table rtse_reassembly_table; diff --git a/epan/dissectors/asn1/sbc-ap/packet-sbc-ap-template.c b/epan/dissectors/asn1/sbc-ap/packet-sbc-ap-template.c index 0bf0c836d7..c7a74eff13 100644 --- a/epan/dissectors/asn1/sbc-ap/packet-sbc-ap-template.c +++ b/epan/dissectors/asn1/sbc-ap/packet-sbc-ap-template.c @@ -36,7 +36,7 @@ void proto_reg_handoff_sbc_ap(void); * The registered payload protocol identifier for SBc-AP is 24. */ #define SBC_AP_PORT 29168 -static dissector_handle_t sbc_ap_handle=NULL; +static dissector_handle_t sbc_ap_handle; #include "packet-sbc-ap-val.h" diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c index 29f63143fb..78bb90bab1 100644 --- a/epan/dissectors/asn1/snmp/packet-snmp-template.c +++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c @@ -147,10 +147,10 @@ static snmp_usm_decoder_t priv_protos[] = { snmp_usm_priv_aes256 }; -static snmp_ue_assoc_t* ueas = NULL; -static guint num_ueas = 0; -static snmp_ue_assoc_t* localized_ues = NULL; -static snmp_ue_assoc_t* unlocalized_ues = NULL; +static snmp_ue_assoc_t* ueas; +static guint num_ueas; +static snmp_ue_assoc_t* localized_ues; +static snmp_ue_assoc_t* unlocalized_ues; /****/ /* Variables used for handling enterprise specific trap types */ @@ -159,14 +159,14 @@ typedef struct _snmp_st_assoc_t { guint trap; char *desc; } snmp_st_assoc_t; -static guint num_specific_traps = 0; -static snmp_st_assoc_t *specific_traps = NULL; -static const char *enterprise_oid = NULL; -static guint generic_trap = 0; -static guint32 snmp_version = 0; +static guint num_specific_traps; +static snmp_st_assoc_t *specific_traps; +static const char *enterprise_oid; +static guint generic_trap; +static guint32 snmp_version; static guint32 RequestID = -1; -static snmp_usm_params_t usm_p = {FALSE,FALSE,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,FALSE}; +static snmp_usm_params_t usm_p; #define TH_AUTH 0x01 #define TH_CRYPT 0x02 diff --git a/epan/dissectors/asn1/spnego/packet-spnego-template.c b/epan/dissectors/asn1/spnego/packet-spnego-template.c index 9aa55ea2e1..e2d626a24c 100644 --- a/epan/dissectors/asn1/spnego/packet-spnego-template.c +++ b/epan/dissectors/asn1/spnego/packet-spnego-template.c @@ -66,7 +66,7 @@ static int hf_spnego_krb5_cfx_seq; /* Global variables */ static const char *MechType_oid; gssapi_oid_value *next_level_value; -gboolean saw_mechanism = FALSE; +gboolean saw_mechanism; /* Initialize the subtree pointers */ diff --git a/epan/dissectors/asn1/sv/packet-sv-template.c b/epan/dissectors/asn1/sv/packet-sv-template.c index fa21ac3043..ffcb5f56aa 100644 --- a/epan/dissectors/asn1/sv/packet-sv-template.c +++ b/epan/dissectors/asn1/sv/packet-sv-template.c @@ -107,7 +107,7 @@ static expert_field ei_sv_mal_utctime; static expert_field ei_sv_zero_pdu; static expert_field ei_sv_mal_gmidentity; -static bool sv_decode_data_as_phsmeas = false; +static bool sv_decode_data_as_phsmeas; static dissector_handle_t sv_handle; diff --git a/epan/dissectors/asn1/t124/packet-t124-template.c b/epan/dissectors/asn1/t124/packet-t124-template.c index 5376ac4f0b..fc9157e5b8 100644 --- a/epan/dissectors/asn1/t124/packet-t124-template.c +++ b/epan/dissectors/asn1/t124/packet-t124-template.c @@ -35,7 +35,7 @@ void proto_reg_handoff_t124(void); /* Initialize the protocol and registered fields */ static int proto_t124; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; #include "packet-t124-hf.c" @@ -49,8 +49,8 @@ static int hf_t124_DomainMCSPDU_PDU; static guint32 channelId = -1; -static dissector_table_t t124_ns_dissector_table=NULL; -static dissector_table_t t124_sd_dissector_table=NULL; +static dissector_table_t t124_ns_dissector_table; +static dissector_table_t t124_sd_dissector_table; #include "packet-t124-ett.c" diff --git a/epan/dissectors/asn1/t125/packet-t125-template.c b/epan/dissectors/asn1/t125/packet-t125-template.c index 574a467f2c..4d3953be37 100644 --- a/epan/dissectors/asn1/t125/packet-t125-template.c +++ b/epan/dissectors/asn1/t125/packet-t125-template.c @@ -40,7 +40,7 @@ void proto_reg_handoff_t125(void); /* Initialize the protocol and registered fields */ static int proto_t125; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; #include "packet-t125-hf.c" /* Initialize the subtree pointers */ diff --git a/epan/dissectors/asn1/t38/packet-t38-template.c b/epan/dissectors/asn1/t38/packet-t38-template.c index ea036b577f..c1f9661b16 100644 --- a/epan/dissectors/asn1/t38/packet-t38-template.c +++ b/epan/dissectors/asn1/t38/packet-t38-template.c @@ -59,7 +59,7 @@ static bool use_pre_corrigendum_asn1_specification = true; /* instead of as T.38. This may result in that some T.38 UPTL */ /* packets with sequence number values higher than 32767 may be */ /* shown as RTP packets. */ -static bool dissect_possible_rtpv2_packets_as_rtp = false; +static bool dissect_possible_rtpv2_packets_as_rtp; /* Reassembly of T.38 PDUs over TPKT over TCP */ @@ -130,7 +130,7 @@ static gint ett_data_fragments; static expert_field ei_t38_malformed; static gboolean primary_part = TRUE; -static guint32 seq_number = 0; +static guint32 seq_number; /* Tables for reassembly of Data fragments. */ static reassembly_table data_reassembly_table; @@ -164,11 +164,11 @@ typedef struct _fragment_key { guint32 id; } fragment_key; -static conversation_t *p_conv= NULL; -static t38_conv *p_t38_conv = NULL; -static t38_conv *p_t38_packet_conv = NULL; -static t38_conv_info *p_t38_conv_info = NULL; -static t38_conv_info *p_t38_packet_conv_info = NULL; +static conversation_t *p_conv; +static t38_conv *p_t38_conv; +static t38_conv *p_t38_packet_conv; +static t38_conv_info *p_t38_conv_info; +static t38_conv_info *p_t38_packet_conv_info; /* RTP Version is the first 2 bits of the first octet in the UDP payload*/ #define RTP_VERSION(octet) ((octet) >> 6) @@ -184,7 +184,7 @@ static bool global_t38_show_setup_info = true; #define MAX_T38_MESSAGES_IN_PACKET 4 static t38_packet_info t38_info_arr[MAX_T38_MESSAGES_IN_PACKET]; static int t38_info_current=0; -static t38_packet_info *t38_info=NULL; +static t38_packet_info *t38_info; /* Set up an T38 conversation */ diff --git a/epan/dissectors/asn1/tcap/packet-tcap-template.c b/epan/dissectors/asn1/tcap/packet-tcap-template.c index b23b25deec..800f444cdd 100644 --- a/epan/dissectors/asn1/tcap/packet-tcap-template.c +++ b/epan/dissectors/asn1/tcap/packet-tcap-template.c @@ -57,11 +57,11 @@ gint ett_tcap_stat; static struct tcapsrt_info_t * gp_tcapsrt_info; static gboolean tcap_subdissector_used=FALSE; -static dissector_handle_t requested_subdissector_handle = NULL; +static dissector_handle_t requested_subdissector_handle; static int ss7pc_address_type = -1; -static struct tcaphash_context_t * gp_tcap_context=NULL; +static struct tcaphash_context_t * gp_tcap_context; #include "packet-tcap-ett.c" @@ -85,20 +85,20 @@ gboolean gtcap_DisplaySRT=FALSE; gboolean gtcap_StatSRT=FALSE; /* Global hash tables*/ -static wmem_map_t *tcaphash_context = NULL; -static wmem_map_t *tcaphash_begin = NULL; -static wmem_map_t *tcaphash_cont = NULL; -static wmem_map_t *tcaphash_end = NULL; -static wmem_map_t *tcaphash_ansi = NULL; +static wmem_map_t *tcaphash_context; +static wmem_map_t *tcaphash_begin; +static wmem_map_t *tcaphash_cont; +static wmem_map_t *tcaphash_end; +static wmem_map_t *tcaphash_ansi; static guint32 tcapsrt_global_SessionId=1; -static dissector_handle_t tcap_handle = NULL; +static dissector_handle_t tcap_handle; static dissector_table_t ber_oid_dissector_table; static const char * cur_oid; static const char * tcapext_oid; -static proto_tree * tcap_top_tree=NULL; -static proto_tree * tcap_stat_tree=NULL; +static proto_tree * tcap_top_tree; +static proto_tree * tcap_stat_tree; static dissector_handle_t data_handle; static dissector_handle_t ansi_tcap_handle; @@ -106,8 +106,8 @@ static dissector_handle_t ansi_tcap_handle; static int dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset); static bool dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_); -static dissector_table_t ansi_sub_dissectors = NULL; -static dissector_table_t itu_sub_dissectors = NULL; +static dissector_table_t ansi_sub_dissectors; +static dissector_table_t itu_sub_dissectors; extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) { dissector_add_uint("ansi_tcap.ssn",ssn,dissector); diff --git a/epan/dissectors/asn1/x509af/packet-x509af-template.c b/epan/dissectors/asn1/x509af/packet-x509af-template.c index d1c60dd22d..6f5c288d9d 100644 --- a/epan/dissectors/asn1/x509af/packet-x509af-template.c +++ b/epan/dissectors/asn1/x509af/packet-x509af-template.c @@ -45,7 +45,7 @@ static int hf_x509af_extension_id; /* Initialize the subtree pointers */ static gint ett_pkix_crl; #include "packet-x509af-ett.c" -static const char *algorithm_id = NULL; +static const char *algorithm_id; static void x509af_export_publickey(tvbuff_t *tvb, asn1_ctx_t *actx, int offset, int len); #include "packet-x509af-fn.c" diff --git a/epan/dissectors/asn1/x509if/packet-x509if-template.c b/epan/dissectors/asn1/x509if/packet-x509if-template.c index 0b4a20e8c5..b9c1a04a60 100644 --- a/epan/dissectors/asn1/x509if/packet-x509if-template.c +++ b/epan/dissectors/asn1/x509if/packet-x509if-template.c @@ -39,21 +39,21 @@ static int hf_x509if_any_string; /* Initialize the subtree pointers */ #include "packet-x509if-ett.c" -static proto_tree *top_of_dn = NULL; -static proto_tree *top_of_rdn = NULL; +static proto_tree *top_of_dn; +static proto_tree *top_of_rdn; -static gboolean rdn_one_value = FALSE; /* have we seen one value in an RDN yet */ -static gboolean dn_one_rdn = FALSE; /* have we seen one RDN in a DN yet */ -static gboolean doing_attr = FALSE; +static gboolean rdn_one_value; /* have we seen one value in an RDN yet */ +static gboolean dn_one_rdn; /* have we seen one RDN in a DN yet */ +static gboolean doing_attr; -static wmem_strbuf_t *last_dn_buf = NULL; -static wmem_strbuf_t *last_rdn_buf = NULL; +static wmem_strbuf_t *last_dn_buf; +static wmem_strbuf_t *last_rdn_buf; static int ava_hf_index; #define MAX_FMT_VALS 32 static value_string fmt_vals[MAX_FMT_VALS]; #define MAX_AVA_STR_LEN 64 -static char *last_ava = NULL; +static char *last_ava; static void x509if_frame_end(void) diff --git a/epan/dissectors/asn1/z3950/packet-z3950-template.c b/epan/dissectors/asn1/z3950/packet-z3950-template.c index 2cddb71e45..2cfed78b53 100644 --- a/epan/dissectors/asn1/z3950/packet-z3950-template.c +++ b/epan/dissectors/asn1/z3950/packet-z3950-template.c @@ -99,7 +99,7 @@ typedef struct marc_directory_entry { guint32 starting_character; } marc_directory_entry; -static dissector_handle_t z3950_handle=NULL; +static dissector_handle_t z3950_handle; void proto_reg_handoff_z3950(void); void proto_register_z3950(void); diff --git a/epan/dissectors/file-btsnoop.c b/epan/dissectors/file-btsnoop.c index 69c1969b02..7676dd8ce9 100644 --- a/epan/dissectors/file-btsnoop.c +++ b/epan/dissectors/file-btsnoop.c @@ -53,7 +53,7 @@ static gint ett_btsnoop_frame; static gint ett_btsnoop_payload; static gint ett_btsnoop_flags; -static bool pref_dissect_next_layer = false; +static bool pref_dissect_next_layer; extern value_string_ext hci_mon_opcode_vals_ext; diff --git a/epan/dissectors/file-mp4.c b/epan/dissectors/file-mp4.c index 0d1888f913..afc9a933bd 100644 --- a/epan/dissectors/file-mp4.c +++ b/epan/dissectors/file-mp4.c @@ -127,7 +127,7 @@ static expert_field ei_mp4_box_too_large; static expert_field ei_mp4_too_many_rec_lvls; static expert_field ei_mp4_mvhd_next_tid_unknown; -static guint32 mvhd_timescale = 0; +static guint32 mvhd_timescale; /* a box must at least have a 32bit len field and a 32bit type */ #define MIN_BOX_SIZE 8 diff --git a/epan/dissectors/file-pcap.c b/epan/dissectors/file-pcap.c index 914db85999..49a68a3ba9 100644 --- a/epan/dissectors/file-pcap.c +++ b/epan/dissectors/file-pcap.c @@ -50,7 +50,7 @@ static gint ett_pcap_packet; static gint ett_pcap_packet_data; static gint ett_pcap_timestamp; -static bool pref_dissect_next_layer = false; +static bool pref_dissect_next_layer; void proto_register_file_pcap(void); void proto_reg_handoff_file_pcap(void); diff --git a/epan/dissectors/file-pcapng.c b/epan/dissectors/file-pcapng.c index c504c739ef..dedf747a93 100644 --- a/epan/dissectors/file-pcapng.c +++ b/epan/dissectors/file-pcapng.c @@ -211,7 +211,7 @@ static int * const hfx_pcapng_option_data_packet_darwin_flags[] = { NULL }; -static bool pref_dissect_next_layer = false; +static bool pref_dissect_next_layer; static const value_string block_type_vals[] = { { BLOCK_TYPE_IDB, "Interface Description Block" }, @@ -254,7 +254,7 @@ static const value_string block_type_vals[] = { /* blockId-> local_block_callback_info_t* */ -static GHashTable *s_local_block_callback_table = NULL; +static GHashTable *s_local_block_callback_table; #define OPTION_CODE_CUSTOM_OPTIONS \ { 2988, "Custom Option UTF-8 string which can be copied" }, \ diff --git a/epan/dissectors/file-rfc7468.c b/epan/dissectors/file-rfc7468.c index b3d6c811c7..44d0e36aae 100644 --- a/epan/dissectors/file-rfc7468.c +++ b/epan/dissectors/file-rfc7468.c @@ -27,8 +27,8 @@ static int hf_rfc7468_preeb_label; static int hf_rfc7468_ber_data; static int hf_rfc7468_posteb_label; -static dissector_handle_t rfc7468_handle = NULL; -static dissector_handle_t ber_handle = NULL; +static dissector_handle_t rfc7468_handle; +static dissector_handle_t ber_handle; static dissector_table_t rfc7468_label_table; diff --git a/epan/dissectors/packet-2dparityfec.c b/epan/dissectors/packet-2dparityfec.c index 8889dfc4f0..ba2a4c81ec 100644 --- a/epan/dissectors/packet-2dparityfec.c +++ b/epan/dissectors/packet-2dparityfec.c @@ -55,9 +55,9 @@ void proto_register_2dparityfec(void); void proto_reg_handoff_2dparityfec(void); -static dissector_handle_t handle_2dparityfec = NULL; +static dissector_handle_t handle_2dparityfec; -static bool dissect_fec = false; +static bool dissect_fec; static int fec_rtp_payload_type = 96; diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c index a79ea39121..e47c6e39b2 100644 --- a/epan/dissectors/packet-3g-a11.c +++ b/epan/dissectors/packet-3g-a11.c @@ -42,7 +42,7 @@ void proto_register_a11(void); void proto_reg_handoff_a11(void); -static int registration_request_msg =0; +static int registration_request_msg; /* Initialize the protocol and registered fields */ static int proto_a11; @@ -213,7 +213,7 @@ static expert_field ei_a11_bcmcs_too_short; static expert_field ei_a11_entry_data_not_dissected; static expert_field ei_a11_session_data_not_dissected; -static dissector_handle_t a11_handle = NULL; +static dissector_handle_t a11_handle; /* Port used for Mobile IP based Tunneling Protocol (A11) */ #define UDP_PORT_3GA11 699 /* Not IANA registered */ diff --git a/epan/dissectors/packet-5co-legacy.c b/epan/dissectors/packet-5co-legacy.c index 161828355e..0913622ea8 100644 --- a/epan/dissectors/packet-5co-legacy.c +++ b/epan/dissectors/packet-5co-legacy.c @@ -160,12 +160,12 @@ typedef struct } FCOSConvRequestVal; /* Conversation hash tables */ -static wmem_map_t *FiveCo_requests_hash = NULL; +static wmem_map_t *FiveCo_requests_hash; /* Internal unique ID (used to match answer with question since some software set always 0 as packet ID in protocol header) */ -static guint64 g_unInternalID = 0; +static guint64 g_unInternalID; /* Register definition structure (used to detect known registers when it is possible) */ typedef struct diff --git a/epan/dissectors/packet-5co-rap.c b/epan/dissectors/packet-5co-rap.c index 782dc45244..930b628571 100644 --- a/epan/dissectors/packet-5co-rap.c +++ b/epan/dissectors/packet-5co-rap.c @@ -138,7 +138,7 @@ typedef struct /* Conversation hash table (conversation-id -> FCOSConvDevices*) */ /* TODO: could just have FCOSConvDevices* as conversation data type? */ -static GHashTable *fiveco_types_models_hash = NULL; +static GHashTable *fiveco_types_models_hash; enum FCOERegistersType { REGISTER, diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index 2047316512..a91737433e 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -544,7 +544,7 @@ static const fragment_items lowpan_frag_items = { }; static reassembly_table lowpan_reassembly_table; -static GHashTable *lowpan_context_table = NULL; +static GHashTable *lowpan_context_table; /* Link-Local prefix used by 6LoWPAN (FF80::/10) */ static const guint8 lowpan_llprefix[8] = { @@ -574,8 +574,8 @@ static lowpan_context_data lowpan_context_default; static const gchar * lowpan_context_prefs[LOWPAN_CONTEXT_MAX]; /* Preferences */ -static bool rfc4944_short_address_format = false; -static bool iid_has_universal_local_bit = false; +static bool rfc4944_short_address_format; +static bool iid_has_universal_local_bit; static bool ipv6_summary_in_tree = true; /* Helper macro to convert a bit offset/length into a byte count. */ diff --git a/epan/dissectors/packet-9p.c b/epan/dissectors/packet-9p.c index f11b02d542..5b8d3f6455 100644 --- a/epan/dissectors/packet-9p.c +++ b/epan/dissectors/packet-9p.c @@ -1115,7 +1115,7 @@ static gint ett_9P_lflags; static expert_field ei_9P_first_250; static expert_field ei_9P_msgtype; -static wmem_map_t *_9p_hashtable = NULL; +static wmem_map_t *_9p_hashtable; static void dissect_9P_dm(tvbuff_t *tvb, proto_item *tree, int offset, int iscreate); static void dissect_9P_qid(tvbuff_t *tvb, proto_tree *tree, int offset); diff --git a/epan/dissectors/packet-a21.c b/epan/dissectors/packet-a21.c index 9f0b440bb0..adf75ad13e 100644 --- a/epan/dissectors/packet-a21.c +++ b/epan/dissectors/packet-a21.c @@ -24,8 +24,8 @@ void proto_register_a21(void); void proto_reg_handoff_a21(void); #define A21_PORT 23272 -static dissector_handle_t a21_handle = NULL; -static dissector_handle_t gcsna_handle = NULL; +static dissector_handle_t a21_handle; +static dissector_handle_t gcsna_handle; static int proto_a21; diff --git a/epan/dissectors/packet-acdr.c b/epan/dissectors/packet-acdr.c index 87db046939..7358a93fc2 100644 --- a/epan/dissectors/packet-acdr.c +++ b/epan/dissectors/packet-acdr.c @@ -389,7 +389,7 @@ static dissector_handle_t acdr_mii_dissector_handle; static dissector_handle_t acdr_rtp_dissector_handle; static dissector_handle_t acdr_xml_dissector_handle; static dissector_handle_t rtp_dissector_handle; -static dissector_handle_t udp_stun_dissector_handle = NULL; +static dissector_handle_t udp_stun_dissector_handle; static dissector_handle_t rtp_events_handle; static dissector_handle_t rtp_rfc2198_handle; static dissector_handle_t amr_handle; diff --git a/epan/dissectors/packet-acn.c b/epan/dissectors/packet-acn.c index 376b2aeae3..10062b51cf 100644 --- a/epan/dissectors/packet-acn.c +++ b/epan/dissectors/packet-acn.c @@ -627,11 +627,11 @@ static int hf_acn_dmx_sync_reserved; /* static int hf_acn_dmx_dmp_vector; */ /* Try heuristic ACN decode */ -static bool global_acn_dmx_enable = false; -static gint global_acn_dmx_display_view = 0; -static gint global_acn_dmx_display_line_format = 0; -static bool global_acn_dmx_display_zeros = false; -static bool global_acn_dmx_display_leading_zeros = false; +static bool global_acn_dmx_enable; +static gint global_acn_dmx_display_view; +static gint global_acn_dmx_display_line_format; +static bool global_acn_dmx_display_zeros; +static bool global_acn_dmx_display_leading_zeros; static int proto_magic; static gint ett_magic; diff --git a/epan/dissectors/packet-acr122.c b/epan/dissectors/packet-acr122.c index 3e85643862..6cefcfc663 100644 --- a/epan/dissectors/packet-acr122.c +++ b/epan/dissectors/packet-acr122.c @@ -82,7 +82,7 @@ static expert_field ei_unknown_command_or_invalid_parameters; static dissector_handle_t acr122_handle; static dissector_handle_t pn532_handle; -static wmem_tree_t *command_info = NULL; +static wmem_tree_t *command_info; typedef struct command_data_t { guint32 bus_id; diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c index e6acb9704c..ba501946aa 100644 --- a/epan/dissectors/packet-acse.c +++ b/epan/dissectors/packet-acse.c @@ -209,7 +209,7 @@ static expert_field ei_acse_dissector_not_available; static expert_field ei_acse_malformed; static expert_field ei_acse_invalid_oid; -static dissector_handle_t acse_handle = NULL; +static dissector_handle_t acse_handle; /* indirect_reference, used to pick up the signalling so we know what kind of data is transferred in SES_DATA_TRANSFER_PDUs */ @@ -222,7 +222,7 @@ typedef struct _acse_ctx_oid_t { guint32 ctx_id; char *oid; } acse_ctx_oid_t; -static wmem_map_t *acse_ctx_oid_table = NULL; +static wmem_map_t *acse_ctx_oid_table; static guint acse_ctx_oid_hash(gconstpointer k) diff --git a/epan/dissectors/packet-adb.c b/epan/dissectors/packet-adb.c index b18abe73a4..a8267efe9d 100644 --- a/epan/dissectors/packet-adb.c +++ b/epan/dissectors/packet-adb.c @@ -61,8 +61,8 @@ static dissector_handle_t adb_service_handle; static gint proto_tcp; static gint proto_usb; -static wmem_tree_t *command_info = NULL; -static wmem_tree_t *service_info = NULL; +static wmem_tree_t *command_info; +static wmem_tree_t *service_info; typedef struct service_data_t { guint32 start_in_frame; diff --git a/epan/dissectors/packet-adb_cs.c b/epan/dissectors/packet-adb_cs.c index e05013716d..5169f1132f 100644 --- a/epan/dissectors/packet-adb_cs.c +++ b/epan/dissectors/packet-adb_cs.c @@ -37,7 +37,7 @@ static expert_field ei_incomplete_message; static dissector_handle_t adb_cs_handle; static dissector_handle_t adb_service_handle; -static wmem_tree_t *client_requests = NULL; +static wmem_tree_t *client_requests; static guint server_port = 5037; diff --git a/epan/dissectors/packet-adb_service.c b/epan/dissectors/packet-adb_service.c index cf707245f7..f33d53f4fc 100644 --- a/epan/dissectors/packet-adb_service.c +++ b/epan/dissectors/packet-adb_service.c @@ -66,11 +66,11 @@ static gint ett_data; static dissector_handle_t adb_service_handle; static dissector_handle_t logcat_handle; -static bool pref_dissect_more_detail_framebuffer = false; +static bool pref_dissect_more_detail_framebuffer; -static wmem_tree_t *fragments = NULL; -static wmem_tree_t *framebuffer_infos = NULL; -static wmem_tree_t *continuation_infos = NULL; +static wmem_tree_t *fragments; +static wmem_tree_t *framebuffer_infos; +static wmem_tree_t *continuation_infos; typedef struct _framebuffer_data_t { guint32 data_in; diff --git a/epan/dissectors/packet-aeron.c b/epan/dissectors/packet-aeron.c index d2a45cbb22..c8b3fb20f6 100644 --- a/epan/dissectors/packet-aeron.c +++ b/epan/dissectors/packet-aeron.c @@ -40,10 +40,10 @@ static heur_dissector_list_t aeron_heuristic_subdissector_list; /* Preferences. */ /*----------------------------------------------------------------------------*/ -static bool aeron_sequence_analysis = false; -static bool aeron_stream_analysis = false; -static bool aeron_reassemble_fragments = false; -static bool aeron_use_heuristic_subdissectors = false; +static bool aeron_sequence_analysis; +static bool aeron_stream_analysis; +static bool aeron_reassemble_fragments; +static bool aeron_use_heuristic_subdissectors; /*----------------------------------------------------------------------------*/ /* Aeron position routines. */ @@ -137,7 +137,7 @@ static gboolean aeron_pos_add_length(aeron_pos_t * pos, guint32 length, guint32 /*----------------------------------------------------------------------------*/ /* Aeron frame information management. */ /*----------------------------------------------------------------------------*/ -static wmem_tree_t * aeron_frame_info_tree = NULL; +static wmem_tree_t * aeron_frame_info_tree; struct aeron_frame_info_t_stct; typedef struct aeron_frame_info_t_stct aeron_frame_info_t; diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c index 3f9ee8e443..7f7894de7d 100644 --- a/epan/dissectors/packet-afp.c +++ b/epan/dissectors/packet-afp.c @@ -1149,7 +1149,7 @@ typedef struct { guint16 tid; } afp_request_key; -static wmem_map_t *afp_request_hash = NULL; +static wmem_map_t *afp_request_hash; static guint Vol; /* volume */ static guint Did; /* parent directory ID */ diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c index 32372f2655..4e6e7805ab 100644 --- a/epan/dissectors/packet-afs.c +++ b/epan/dissectors/packet-afs.c @@ -32,7 +32,7 @@ void proto_register_afs(void); /* Defragment (reassemble) fragmented AFS traffic */ -static bool afs_defragment = false; +static bool afs_defragment; #define AFS_PORT_FS 7000 #define AFS_PORT_CB 7001 @@ -1411,7 +1411,7 @@ struct afs_request_val { nstime_t req_time; }; -static wmem_map_t *afs_request_hash = NULL; +static wmem_map_t *afs_request_hash; static reassembly_table afs_reassembly_table; /* diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c index ff0b9d8894..f7445db390 100644 --- a/epan/dissectors/packet-aim.c +++ b/epan/dissectors/packet-aim.c @@ -543,7 +543,7 @@ static bool aim_desegment = true; static dissector_handle_t aim_handle; -static GList *families = NULL; +static GList *families; static const aim_subtype *aim_get_subtype( guint16 famnum, guint16 subtype ) diff --git a/epan/dissectors/packet-ain.c b/epan/dissectors/packet-ain.c index 0ec672e759..fc8589b2b0 100644 --- a/epan/dissectors/packet-ain.c +++ b/epan/dissectors/packet-ain.c @@ -735,8 +735,8 @@ static expert_field ei_ain_unknown_returnResultData; static expert_field ei_ain_unknown_returnErrorData; /* Global variables */ -static guint32 opcode = 0; -static guint32 errorCode = 0; +static guint32 opcode; +static guint32 errorCode; //static const char *obj_id = NULL; static int ain_opcode_type; diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c index c37d84f9cd..c45c468a83 100644 --- a/epan/dissectors/packet-alcap.c +++ b/epan/dissectors/packet-alcap.c @@ -401,13 +401,13 @@ static expert_field ei_alcap_release_cause_not31; static expert_field ei_alcap_abnormal_release; static expert_field ei_alcap_response; -static dissector_handle_t alcap_handle = NULL; +static dissector_handle_t alcap_handle; static bool keep_persistent_info = true; -static wmem_tree_t* legs_by_dsaid = NULL; -static wmem_tree_t* legs_by_osaid = NULL; -static wmem_tree_t* legs_by_bearer = NULL; +static wmem_tree_t* legs_by_dsaid; +static wmem_tree_t* legs_by_osaid; +static wmem_tree_t* legs_by_bearer; static const gchar* dissect_fields_unknown(packet_info* pinfo, tvbuff_t *tvb, proto_tree *tree, int offset, int len, alcap_message_info_t* msg_info _U_) { proto_item* pi = proto_tree_add_item(tree,hf_alcap_unknown,tvb,offset,len,ENC_NA); diff --git a/epan/dissectors/packet-amp.c b/epan/dissectors/packet-amp.c index d45352f050..f091974944 100644 --- a/epan/dissectors/packet-amp.c +++ b/epan/dissectors/packet-amp.c @@ -114,7 +114,7 @@ static gint ett_amp_ari_flags; static int hf_amp_reserved; static int hf_amp_acl; static int hf_amp_nack; -static int hf_amp_ack = 0; +static int hf_amp_ack; static int hf_amp_opcode; static int hf_amp_rx_name; diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c index 347b85c187..63a3d4e6f1 100644 --- a/epan/dissectors/packet-amqp.c +++ b/epan/dissectors/packet-amqp.c @@ -1577,7 +1577,7 @@ static expert_field ei_amqp_invalid_number_of_params; static expert_field ei_amqp_size_exceeds_65K; static expert_field ei_amqp_array_type_unknown; -static dissector_handle_t amqp_tcp_handle = NULL; +static dissector_handle_t amqp_tcp_handle; static amqp_message_decode_t *amqp_message_decodes; static guint num_amqp_message_decodes; diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c index dfb387f367..75b9b23656 100644 --- a/epan/dissectors/packet-ansi_a.c +++ b/epan/dissectors/packet-ansi_a.c @@ -926,9 +926,9 @@ value_string_ext ansi_tsb58_srvc_cat_vals_ext = VALUE_STRING_EXT_INIT(ansi_tsb58 static int proto_a_bsmap; static int proto_a_dtap; -const ext_value_string_t *ansi_a_bsmap_strings = NULL; -const ext_value_string_t *ansi_a_dtap_strings = NULL; -const ext_value_string_t *ansi_a_elem_1_strings = NULL; +const ext_value_string_t *ansi_a_bsmap_strings; +const ext_value_string_t *ansi_a_dtap_strings; +const ext_value_string_t *ansi_a_elem_1_strings; static int ansi_a_tap; diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c index 6ef5139d9b..9618f9ce0f 100644 --- a/epan/dissectors/packet-ansi_map.c +++ b/epan/dissectors/packet-ansi_map.c @@ -107,7 +107,7 @@ static range_t *global_ssn_range; #define ANSI_MAP_TID_SOURCE_AND_DEST 2 static gint ansi_map_response_matching_type = ANSI_MAP_TID_AND_SOURCE; -static dissector_handle_t ansi_map_handle=NULL; +static dissector_handle_t ansi_map_handle; /* Initialize the protocol and registered fields */ static int ansi_map_tap; @@ -1132,7 +1132,7 @@ static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */ static dissector_table_t is801_dissector_table; /* IS-801 (PLD) */ static packet_info *g_pinfo; static proto_tree *g_tree; -static tvbuff_t *SMS_BearerData_tvb = NULL; +static tvbuff_t *SMS_BearerData_tvb; static gint32 ansi_map_sms_tele_id = -1; static gboolean is683_ota; static gboolean is801_pld; @@ -1150,7 +1150,7 @@ static void dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo /* Transaction table */ -static wmem_multimap_t *TransactionId_table=NULL; +static wmem_multimap_t *TransactionId_table; /* Store Invoke information needed for the corresponding reply */ static void diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index f0b69d7a72..270282865b 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -122,7 +122,7 @@ static expert_field ei_ansi_tcap_dissector_not_implemented; static struct tcapsrt_info_t * gp_tcapsrt_info; static gboolean tcap_subdissector_used=FALSE; -static struct tcaphash_context_t * gp_tcap_context=NULL; +static struct tcaphash_context_t * gp_tcap_context; /* Note the high bit should be masked off when registering in this table (0x7fff)*/ static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation Codes */ @@ -159,7 +159,7 @@ static gint ett_ansi_tcap_T_paramSet; int tcapsrt_global_current=0; struct tcapsrt_info_t tcapsrt_global_info[MAX_TCAP_INSTANCE]; -static dissector_table_t ber_oid_dissector_table=NULL; +static dissector_table_t ber_oid_dissector_table; static const char * cur_oid; static const char * tcapext_oid; @@ -206,7 +206,7 @@ struct ansi_tcap_invokedata_t { gint32 OperationCode_national; }; -static wmem_multimap_t *TransactionId_table=NULL; +static wmem_multimap_t *TransactionId_table; /* Store Invoke information needed for the corresponding reply */ static void diff --git a/epan/dissectors/packet-aoe.c b/epan/dissectors/packet-aoe.c index 86c389e30e..a458cc8955 100644 --- a/epan/dissectors/packet-aoe.c +++ b/epan/dissectors/packet-aoe.c @@ -160,8 +160,8 @@ typedef struct ata_info_t { nstime_t req_time; guint8 cmd; } ata_info_t; -static wmem_map_t *ata_cmd_unmatched = NULL; -static wmem_map_t *ata_cmd_matched = NULL; +static wmem_map_t *ata_cmd_unmatched; +static wmem_map_t *ata_cmd_matched; static guint ata_cmd_hash_matched(gconstpointer k) diff --git a/epan/dissectors/packet-aprs.c b/epan/dissectors/packet-aprs.c index a841e160c9..e113a1fa12 100644 --- a/epan/dissectors/packet-aprs.c +++ b/epan/dissectors/packet-aprs.c @@ -153,7 +153,7 @@ static int hf_aprs_shelter_data; static int hf_aprs_space_weather; -static bool gPREF_APRS_LAX = false; +static bool gPREF_APRS_LAX; static gint ett_aprs; static gint ett_aprs_msg; diff --git a/epan/dissectors/packet-armagetronad.c b/epan/dissectors/packet-armagetronad.c index 0d33ef2d46..5e6ef4df25 100644 --- a/epan/dissectors/packet-armagetronad.c +++ b/epan/dissectors/packet-armagetronad.c @@ -28,7 +28,7 @@ static int hf_armagetronad_msg_subtree; static gint ett_armagetronad; static gint ett_message; -static dissector_handle_t armagetronad_handle = NULL; +static dissector_handle_t armagetronad_handle; #define ARMAGETRONAD_UDP_PORT_RANGE "4533-4534" /* 4533 is not IANA registered, 4534 is */ diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index 8c3afa1c5a..317175dd9d 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -104,20 +104,20 @@ static capture_dissector_handle_t arp_cap_handle; #define NO_STORM 2 /* Preference settings */ -static bool global_arp_detect_request_storm = false; +static bool global_arp_detect_request_storm; static guint32 global_arp_detect_request_storm_packets = 30; static guint32 global_arp_detect_request_storm_period = 100; static bool global_arp_detect_duplicate_ip_addresses = true; static bool global_arp_register_network_address_binding = true; -static guint32 arp_request_count = 0; +static guint32 arp_request_count; static nstime_t time_at_start_of_count; /* Map of (IP address -> MAC address) to detect duplicate IP addresses Key is unsigned32 */ -static wmem_map_t *address_hash_table = NULL; +static wmem_map_t *address_hash_table; typedef struct address_hash_value { guint8 mac[6]; @@ -126,7 +126,7 @@ typedef struct address_hash_value { } address_hash_value; /* Map of ((frame Num, IP address) -> MAC address) */ -static wmem_map_t *duplicate_result_hash_table = NULL; +static wmem_map_t *duplicate_result_hash_table; typedef struct duplicate_result_key { guint32 frame_number; diff --git a/epan/dissectors/packet-artemis.c b/epan/dissectors/packet-artemis.c index c8a256eb05..a2ab0cec7a 100644 --- a/epan/dissectors/packet-artemis.c +++ b/epan/dissectors/packet-artemis.c @@ -34,7 +34,7 @@ static gint ett_artemis; static expert_field ei_artemis_len_short; -static dissector_handle_t artemis_tcp_handle = NULL; +static dissector_handle_t artemis_tcp_handle; void proto_register_artemis(void); void proto_reg_handoff_artemis(void); diff --git a/epan/dissectors/packet-aruba-erm.c b/epan/dissectors/packet-aruba-erm.c index a1c1f666fd..0878afd4f3 100644 --- a/epan/dissectors/packet-aruba-erm.c +++ b/epan/dissectors/packet-aruba-erm.c @@ -123,7 +123,7 @@ void proto_reg_handoff_aruba_erm(void); void proto_reg_handoff_aruba_erm_radio(void); #if 0 -static gint aruba_erm_type = 0; +static gint aruba_erm_type; #endif static int proto_aruba_erm; diff --git a/epan/dissectors/packet-aruba-papi.c b/epan/dissectors/packet-aruba-papi.c index 9f0f5ea566..f42560951c 100644 --- a/epan/dissectors/packet-aruba-papi.c +++ b/epan/dissectors/packet-aruba-papi.c @@ -85,7 +85,7 @@ static expert_field ei_papi_debug_unknown; static dissector_table_t papi_dissector_table; /* Global PAPI Debug Preference */ -static bool g_papi_debug = false; +static bool g_papi_debug; /* Initialize the subtree pointers */ static gint ett_papi; diff --git a/epan/dissectors/packet-asam-cmp.c b/epan/dissectors/packet-asam-cmp.c index ff218481cb..e902ee14f0 100644 --- a/epan/dissectors/packet-asam-cmp.c +++ b/epan/dissectors/packet-asam-cmp.c @@ -32,8 +32,8 @@ static int proto_asam_cmp; static dissector_handle_t eth_handle; -static bool heuristic_first = false; -static bool old_11bit_canid_encoding = false; +static bool heuristic_first; +static bool old_11bit_canid_encoding; static dissector_table_t lin_subdissector_table; @@ -723,9 +723,9 @@ typedef struct _interface_config { /* Devices */ #define DATAFILE_ASAM_CMP_DEVICES_IDS "ASAM_CMP_devices" -static GHashTable *data_asam_cmp_devices = NULL; -static generic_one_id_string_t *asam_cmp_devices = NULL; -static guint asam_cmp_devices_num = 0; +static GHashTable *data_asam_cmp_devices; +static generic_one_id_string_t *asam_cmp_devices; +static guint asam_cmp_devices_num; UAT_HEX_CB_DEF(asam_cmp_devices, id, generic_one_id_string_t) UAT_CSTRING_CB_DEF(asam_cmp_devices, name, generic_one_id_string_t) @@ -733,9 +733,9 @@ UAT_CSTRING_CB_DEF(asam_cmp_devices, name, generic_one_id_string_t) /* Interfaces */ #define DATAFILE_ASAM_CMP_IFACE_IDS "ASAM_CMP_interfaces" -static GHashTable *data_asam_cmp_interfaces = NULL; -static interface_config_t *asam_cmp_interfaces = NULL; -static guint asam_cmp_interface_num = 0; +static GHashTable *data_asam_cmp_interfaces; +static interface_config_t *asam_cmp_interfaces; +static guint asam_cmp_interface_num; UAT_HEX_CB_DEF(asam_cmp_interfaces, id, interface_config_t) UAT_CSTRING_CB_DEF(asam_cmp_interfaces, name, interface_config_t) diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c index 212d6f1135..f41da4978e 100644 --- a/epan/dissectors/packet-asap.c +++ b/epan/dissectors/packet-asap.c @@ -89,8 +89,8 @@ static gint ett_asap_parameter; static gint ett_asap_cause; static gint ett_asap_flags; -static guint64 asap_total_msgs = 0; -static guint64 asap_total_bytes = 0; +static guint64 asap_total_msgs; +static guint64 asap_total_bytes; static void dissect_parameters(tvbuff_t *, packet_info *, proto_tree *); diff --git a/epan/dissectors/packet-assa_r3.c b/epan/dissectors/packet-assa_r3.c index 1e8b2e7c8b..092cc31883 100644 --- a/epan/dissectors/packet-assa_r3.c +++ b/epan/dissectors/packet-assa_r3.c @@ -1745,12 +1745,12 @@ static expert_field ei_r3_unknown_command_value; static expert_field ei_r3_response_hasdata_octet_3; static expert_field ei_r3_cmd_downloadfirmwaretimeout; -static dissector_handle_t r3_handle = NULL; +static dissector_handle_t r3_handle; /* * Indicates next command to be processed as a manufacturing command */ -static gint mfgCommandFlag = FALSE; +static gint mfgCommandFlag; /* * Some enums that don't exist in public.h and should diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c index c0138ed475..edb49edc58 100644 --- a/epan/dissectors/packet-atalk.c +++ b/epan/dissectors/packet-atalk.c @@ -242,7 +242,7 @@ typedef struct { guint8 value; /* command for asp, bitmap for atp */ } asp_request_val; -static wmem_map_t *asp_request_hash = NULL; +static wmem_map_t *asp_request_hash; /* Hash Functions */ static gint asp_equal (gconstpointer v, gconstpointer v2) @@ -265,7 +265,7 @@ static guint asp_hash (gconstpointer v) } /* ------------------------------------ */ -static wmem_map_t *atp_request_hash = NULL; +static wmem_map_t *atp_request_hash; /* ------------------------------------ */ diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c index 92a83902e7..de407b8021 100644 --- a/epan/dissectors/packet-atm.c +++ b/epan/dissectors/packet-atm.c @@ -136,7 +136,7 @@ static dissector_handle_t ppp_handle; static dissector_handle_t eth_maybefcs_handle; static dissector_handle_t ip_handle; -static bool dissect_lanesscop = false; +static bool dissect_lanesscop; static dissector_table_t atm_type_aal2_table; static dissector_table_t atm_type_aal5_table; diff --git a/epan/dissectors/packet-atn-ulcs.c b/epan/dissectors/packet-atn-ulcs.c index bdb1714d48..c8b1f0876a 100644 --- a/epan/dissectors/packet-atn-ulcs.c +++ b/epan/dissectors/packet-atn-ulcs.c @@ -121,18 +121,18 @@ void proto_reg_handoff_atn_ulcs(void); static heur_dissector_list_t atn_ulcs_heur_subdissector_list; /* presentation subdissectors i.e. CM, CPDLC */ -static dissector_handle_t atn_cm_handle = NULL; -static dissector_handle_t atn_cpdlc_handle = NULL; +static dissector_handle_t atn_cm_handle; +static dissector_handle_t atn_cpdlc_handle; static int proto_atn_ulcs; -static guint32 ulcs_context_value = 0; +static guint32 ulcs_context_value; static const char *object_identifier_id; -static wmem_tree_t *aarq_data_tree = NULL; -static wmem_tree_t *atn_conversation_tree = NULL; +static wmem_tree_t *aarq_data_tree; +static wmem_tree_t *atn_conversation_tree; -static proto_tree *root_tree = NULL; +static proto_tree *root_tree; /* forward declarations for functions generated from asn1 */ static int dissect_atn_ulcs_T_externalt_encoding_single_asn1_type( diff --git a/epan/dissectors/packet-autosar-ipdu-multiplexer.c b/epan/dissectors/packet-autosar-ipdu-multiplexer.c index e45051f5c2..c2f4aed8af 100644 --- a/epan/dissectors/packet-autosar-ipdu-multiplexer.c +++ b/epan/dissectors/packet-autosar-ipdu-multiplexer.c @@ -36,10 +36,10 @@ static int proto_ipdu_multiplexer; #define IPDUM_NAME "AUTOSAR I-PduM" /* dissector handles - incoming messages */ -static dissector_handle_t ipdum_handle_can = NULL; -static dissector_handle_t ipdum_handle_flexray = NULL; -static dissector_handle_t ipdum_handle_lin = NULL; -static dissector_handle_t ipdum_handle_pdu_transport = NULL; +static dissector_handle_t ipdum_handle_can; +static dissector_handle_t ipdum_handle_flexray; +static dissector_handle_t ipdum_handle_lin; +static dissector_handle_t ipdum_handle_pdu_transport; /* subdissectors - outgoing messages */ static dissector_table_t subdissector_table; @@ -121,25 +121,25 @@ typedef struct _ipdum_pdu_transport_mapping { } ipdum_pdu_transport_mapping_t; typedef ipdum_pdu_transport_mapping_t ipdum_pdu_transport_mapping_uat_t; -static ipdum_message_list_uat_t *ipdum_message_list = NULL; -static guint ipdum_message_list_num = 0; -static GHashTable *data_ipdum_messages = NULL; +static ipdum_message_list_uat_t *ipdum_message_list; +static guint ipdum_message_list_num; +static GHashTable *data_ipdum_messages; -static ipdum_can_mapping_t *ipdum_can_mapping = NULL; -static guint ipdum_can_mapping_num = 0; -static GHashTable *data_ipdum_can_mappings = NULL; +static ipdum_can_mapping_t *ipdum_can_mapping; +static guint ipdum_can_mapping_num; +static GHashTable *data_ipdum_can_mappings; -static ipdum_flexray_mapping_t *ipdum_flexray_mapping = NULL; -static guint ipdum_flexray_mapping_num = 0; -static GHashTable *data_ipdum_flexray_mappings = NULL; +static ipdum_flexray_mapping_t *ipdum_flexray_mapping; +static guint ipdum_flexray_mapping_num; +static GHashTable *data_ipdum_flexray_mappings; -static ipdum_lin_mapping_t *ipdum_lin_mapping = NULL; -static guint ipdum_lin_mapping_num = 0; -static GHashTable *data_ipdum_lin_mappings = NULL; +static ipdum_lin_mapping_t *ipdum_lin_mapping; +static guint ipdum_lin_mapping_num; +static GHashTable *data_ipdum_lin_mappings; -static ipdum_pdu_transport_mapping_t *ipdum_pdu_transport_mapping = NULL; -static guint ipdum_pdu_transport_mapping_num = 0; -static GHashTable *data_ipdum_pdu_transport_mappings = NULL; +static ipdum_pdu_transport_mapping_t *ipdum_pdu_transport_mapping; +static guint ipdum_pdu_transport_mapping_num; +static GHashTable *data_ipdum_pdu_transport_mappings; /* UAT Callbacks and Helpers */ diff --git a/epan/dissectors/packet-autosar-nm.c b/epan/dissectors/packet-autosar-nm.c index dcec611744..18c0764c8c 100644 --- a/epan/dissectors/packet-autosar-nm.c +++ b/epan/dissectors/packet-autosar-nm.c @@ -126,12 +126,12 @@ static const enum_val_t cbv_version_vals[] = { static gint g_autosar_nm_cbv_version = (gint)autosar_4_1_or_newer; /* Id and mask of CAN frames to be dissected */ -static guint32 g_autosar_nm_can_id = 0; +static guint32 g_autosar_nm_can_id; static guint32 g_autosar_nm_can_id_mask = 0xffffffff; /* Relevant PDUs */ -static range_t *g_autosar_nm_pdus = NULL; -static range_t *g_autosar_nm_ipdum_pdus = NULL; +static range_t *g_autosar_nm_pdus; +static range_t *g_autosar_nm_ipdum_pdus; /******************************* diff --git a/epan/dissectors/packet-ax25-kiss.c b/epan/dissectors/packet-ax25-kiss.c index 799e3c026e..9118c04fd5 100644 --- a/epan/dissectors/packet-ax25-kiss.c +++ b/epan/dissectors/packet-ax25-kiss.c @@ -122,7 +122,7 @@ #define KISS_PORT_MASK 0xf0 /* Global preferences */ -static bool gPREF_CKSUM_MODE = false; +static bool gPREF_CKSUM_MODE; void proto_register_ax25_kiss(void); void proto_reg_handoff_ax25_kiss(void); diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c index bf9ca732df..c0edb5d7e2 100644 --- a/epan/dissectors/packet-ax25-nol3.c +++ b/epan/dissectors/packet-ax25-nol3.c @@ -55,8 +55,8 @@ static int hf_dx_report; /* static int hf_text; */ /* Global preferences */ -static bool gPREF_APRS = false; -static bool gPREF_DX = false; +static bool gPREF_APRS; +static bool gPREF_DX; /* Initialize the subtree pointers */ static gint ett_ax25_nol3; diff --git a/epan/dissectors/packet-ayiya.c b/epan/dissectors/packet-ayiya.c index 725e4da0bb..fe37819147 100644 --- a/epan/dissectors/packet-ayiya.c +++ b/epan/dissectors/packet-ayiya.c @@ -35,7 +35,7 @@ static int hf_signature; static gint ett_ayiya; -static dissector_handle_t ayiya_handle = NULL; +static dissector_handle_t ayiya_handle; static const value_string identity_types[] = { { 0x0, "None" }, diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c index 94efea0348..71f74a7a55 100644 --- a/epan/dissectors/packet-bacapp.c +++ b/epan/dissectors/packet-bacapp.c @@ -6828,8 +6828,8 @@ static gint32 propertyIdentifier = -1; static gint32 propertyArrayIndex = -1; static guint32 object_type = 4096; -static guint8 bacapp_flags = 0; -static guint8 bacapp_seq = 0; +static guint8 bacapp_flags; +static guint8 bacapp_seq; /* Defined to allow vendor identifier registration of private transfer dissectors */ static dissector_table_t bacapp_dissector_table; diff --git a/epan/dissectors/packet-bacnet.c b/epan/dissectors/packet-bacnet.c index 233d374cfe..b008634c40 100644 --- a/epan/dissectors/packet-bacnet.c +++ b/epan/dissectors/packet-bacnet.c @@ -303,7 +303,7 @@ static gint ett_bacnet_control; static gint ett_bacnet_wrapper_control; static gint ett_bacnet_update_control; -static dissector_handle_t bacnet_handle = NULL; +static dissector_handle_t bacnet_handle; static int * const control_flags[] = { &hf_bacnet_control_net, diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c index 1264828525..3fb8d129b0 100644 --- a/epan/dissectors/packet-beep.c +++ b/epan/dissectors/packet-beep.c @@ -33,7 +33,7 @@ void proto_reg_handoff_beep(void); static dissector_handle_t beep_handle; -static range_t *global_beep_tcp_ports = NULL; +static range_t *global_beep_tcp_ports; static bool global_beep_strict_term = true; static int proto_beep; @@ -147,7 +147,7 @@ struct beep_request_val { int c_mime_hdr, s_mime_hdr; }; -static wmem_map_t *beep_request_hash = NULL; +static wmem_map_t *beep_request_hash; /* Hash Functions */ static gint diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index 4b89f6b240..a9c3ff26bf 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -185,18 +185,18 @@ static expert_field ei_ber_real_not_primitive; static dissector_handle_t ber_handle; static dissector_handle_t ber_file_handle; -static bool show_internal_ber_fields = false; -static bool decode_octetstring_as_ber = false; -static bool decode_primitive_as_ber = false; -static bool decode_unexpected = false; -static bool decode_warning_leading_zero_bits = false; +static bool show_internal_ber_fields; +static bool decode_octetstring_as_ber; +static bool decode_primitive_as_ber; +static bool decode_unexpected; +static bool decode_warning_leading_zero_bits; -static gchar *decode_as_syntax = NULL; +static gchar *decode_as_syntax; -static dissector_table_t ber_oid_dissector_table = NULL; -static dissector_table_t ber_syntax_dissector_table = NULL; +static dissector_table_t ber_oid_dissector_table; +static dissector_table_t ber_syntax_dissector_table; -static GHashTable *syntax_table = NULL; +static GHashTable *syntax_table; static gint8 last_class; static bool last_pc; diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c index 6110f1b30d..ea6efb7dec 100644 --- a/epan/dissectors/packet-bgp.c +++ b/epan/dissectors/packet-bgp.c @@ -3146,7 +3146,7 @@ static expert_field ei_bgp_mup_nlri_addr_len_err; /* desegmentation */ static bool bgp_desegment = true; -static gint bgp_asn_len = 0; +static gint bgp_asn_len; /* FF: BGP-LS is just a collector of IGP link state information. Some fields are encoded "as-is" from the IGP, hence in order to dissect diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index f7741cb7bd..f454b3ce37 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -173,7 +173,7 @@ static gint ett_bittorrent_msg; static gint ett_peer_id; static bool bittorrent_desegment = true; -static bool decode_client_information = false; +static bool decode_client_information; struct client_information { char id[5]; /* string length must be <= 4 to allow space for NUL termination byte */ diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c index 5d48df23dc..f74ed1b48e 100644 --- a/epan/dissectors/packet-bluetooth.c +++ b/epan/dissectors/packet-bluetooth.c @@ -55,17 +55,17 @@ static dissector_table_t bluetooth_table; static dissector_table_t hci_vendor_table; dissector_table_t bluetooth_uuid_table; -static wmem_tree_t *chandle_sessions = NULL; -static wmem_tree_t *chandle_to_bdaddr = NULL; -static wmem_tree_t *chandle_to_mode = NULL; -static wmem_tree_t *shandle_to_chandle = NULL; -static wmem_tree_t *bdaddr_to_name = NULL; -static wmem_tree_t *bdaddr_to_role = NULL; -static wmem_tree_t *localhost_name = NULL; -static wmem_tree_t *localhost_bdaddr = NULL; -static wmem_tree_t *hci_vendors = NULL; - -wmem_tree_t *bluetooth_uuids = NULL; +static wmem_tree_t *chandle_sessions; +static wmem_tree_t *chandle_to_bdaddr; +static wmem_tree_t *chandle_to_mode; +static wmem_tree_t *shandle_to_chandle; +static wmem_tree_t *bdaddr_to_name; +static wmem_tree_t *bdaddr_to_role; +static wmem_tree_t *localhost_name; +static wmem_tree_t *localhost_bdaddr; +static wmem_tree_t *hci_vendors; + +wmem_tree_t *bluetooth_uuids; static int bluetooth_tap; int bluetooth_device_tap; diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c index 144c62f77d..0a794e0e84 100644 --- a/epan/dissectors/packet-bpdu.c +++ b/epan/dissectors/packet-bpdu.c @@ -186,8 +186,8 @@ static bool bpdu_use_system_id_extensions = true; static dissector_handle_t gvrp_handle; static dissector_handle_t gmrp_handle; -static dissector_handle_t bpdu_handle = NULL; -static dissector_handle_t bpdu_cisco_handle = NULL; +static dissector_handle_t bpdu_handle; +static dissector_handle_t bpdu_cisco_handle; static const value_string protocol_id_vals[] = { { 0, "Spanning Tree Protocol" }, diff --git a/epan/dissectors/packet-bpsec.c b/epan/dissectors/packet-bpsec.c index 5b1cca3e6d..5164bb3909 100644 --- a/epan/dissectors/packet-bpsec.c +++ b/epan/dissectors/packet-bpsec.c @@ -36,10 +36,10 @@ void proto_reg_handoff_bpsec(void); static int proto_bpsec; /// Dissect opaque CBOR data -static dissector_handle_t handle_cbor = NULL; +static dissector_handle_t handle_cbor; /// Extension sub-dissectors -static dissector_table_t param_dissectors = NULL; -static dissector_table_t result_dissectors = NULL; +static dissector_table_t param_dissectors; +static dissector_table_t result_dissectors; static const val64_string shavar_vals[] = { {5, "HMAC 256/256"}, diff --git a/epan/dissectors/packet-bpv6.c b/epan/dissectors/packet-bpv6.c index 39c19a22c6..dd2ed2724e 100644 --- a/epan/dissectors/packet-bpv6.c +++ b/epan/dissectors/packet-bpv6.c @@ -68,9 +68,9 @@ static gint64 evaluate_sdnv_64(tvbuff_t *tvb, int offset, int *bytecount); static int proto_bundle; -static dissector_handle_t bundle_handle = NULL; -static dissector_handle_t bpv6_handle = NULL; -static dissector_handle_t bpv7_handle = NULL; +static dissector_handle_t bundle_handle; +static dissector_handle_t bpv6_handle; +static dissector_handle_t bpv7_handle; static int hf_bundle_pdu_version; diff --git a/epan/dissectors/packet-bpv7.c b/epan/dissectors/packet-bpv7.c index f3b029f52a..7c6490b65f 100644 --- a/epan/dissectors/packet-bpv7.c +++ b/epan/dissectors/packet-bpv7.c @@ -43,7 +43,7 @@ static const char *const proto_name_bp_admin = "BPv7 Admin"; /// Protocol preferences and defaults static bool bp_compute_crc = true; static bool bp_reassemble_payload = true; -static bool bp_payload_try_heur = false; +static bool bp_payload_try_heur; /// Protocol handles static int proto_bp; @@ -52,20 +52,20 @@ static int proto_blocktype; static int proto_bp_admin; static int proto_admintype; /// Protocol-level data -static bp_history_t *bp_history = NULL; +static bp_history_t *bp_history; -static dissector_handle_t handle_admin = NULL; +static dissector_handle_t handle_admin; /// Dissect opaque CBOR data -static dissector_handle_t handle_cbor = NULL; -static dissector_handle_t handle_cborseq = NULL; +static dissector_handle_t handle_cbor; +static dissector_handle_t handle_cborseq; /// Extension sub-dissectors -static dissector_table_t block_dissectors = NULL; -static dissector_table_t payload_dissectors_dtn_wkssp = NULL; -static dissector_table_t payload_dissectors_dtn_serv = NULL; -static dissector_table_t payload_dissectors_ipn_serv = NULL; -static dissector_table_t admin_dissectors = NULL; +static dissector_table_t block_dissectors; +static dissector_table_t payload_dissectors_dtn_wkssp; +static dissector_table_t payload_dissectors_dtn_serv; +static dissector_table_t payload_dissectors_ipn_serv; +static dissector_table_t admin_dissectors; /// BTSD heuristic -static heur_dissector_list_t btsd_heur = NULL; +static heur_dissector_list_t btsd_heur; /// Fragment reassembly static reassembly_table bp_reassembly_table; diff --git a/epan/dissectors/packet-brdwlk.c b/epan/dissectors/packet-brdwlk.c index d2074d2bb7..e1be22b50d 100644 --- a/epan/dissectors/packet-brdwlk.c +++ b/epan/dissectors/packet-brdwlk.c @@ -86,7 +86,7 @@ static gint ett_brdwlk_error; static gint proto_brdwlk; -static guint16 packet_count = 0; +static guint16 packet_count; static gboolean first_pkt = TRUE; /* start of capture */ static dissector_handle_t fc_dissector_handle; diff --git a/epan/dissectors/packet-bt-utp.c b/epan/dissectors/packet-bt-utp.c index b774c85404..2001b3371b 100644 --- a/epan/dissectors/packet-bt-utp.c +++ b/epan/dissectors/packet-bt-utp.c @@ -221,14 +221,14 @@ static expert_field ei_extension_len_invalid; static gint ett_bt_utp; static gint ett_bt_utp_extension; -static bool enable_version0 = false; +static bool enable_version0; static guint max_window_size = V1_MAX_WINDOW_SIZE; /* XXX: Desegementation and OOO-reassembly are not supported yet */ -static gboolean utp_desegment = FALSE; +static gboolean utp_desegment; /*static gboolean utp_reassemble_out_of_order = FALSE;*/ static bool utp_analyze_seq = true; -static guint32 bt_utp_stream_count = 0; +static guint32 bt_utp_stream_count; typedef struct _utp_multisegment_pdu { diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c index 7f271dffcd..a6aa991d1b 100644 --- a/epan/dissectors/packet-btatt.c +++ b/epan/dissectors/packet-btatt.c @@ -2136,10 +2136,10 @@ static expert_field ei_btatt_unexpected_data; static expert_field ei_btatt_undecoded; static expert_field ei_btatt_invalid_length; -static wmem_tree_t *mtus = NULL; -static wmem_tree_t *requests = NULL; -static wmem_tree_t *fragments = NULL; -static wmem_tree_t *handle_to_uuid = NULL; +static wmem_tree_t *mtus; +static wmem_tree_t *requests; +static wmem_tree_t *fragments; +static wmem_tree_t *handle_to_uuid; static dissector_handle_t btatt_handle; static dissector_handle_t btgatt_handle; diff --git a/epan/dissectors/packet-btavctp.c b/epan/dissectors/packet-btavctp.c index 66e9934321..9a5ab59ccb 100644 --- a/epan/dissectors/packet-btavctp.c +++ b/epan/dissectors/packet-btavctp.c @@ -61,8 +61,8 @@ typedef struct _fragments_t { wmem_tree_t *fragment; } fragments_t; -static wmem_tree_t *reassembling = NULL; -static fragments_t *fragments = NULL; +static wmem_tree_t *reassembling; +static fragments_t *fragments; static const value_string packet_type_vals[] = { { PACKET_TYPE_SINGLE, "Single" }, diff --git a/epan/dissectors/packet-btavdtp.c b/epan/dissectors/packet-btavdtp.c index 7fc16403d5..892ff5e05c 100644 --- a/epan/dissectors/packet-btavdtp.c +++ b/epan/dissectors/packet-btavdtp.c @@ -296,10 +296,10 @@ static dissector_handle_t bta2dp_handle; static dissector_handle_t btvdp_handle; static dissector_handle_t rtp_handle; -static wmem_tree_t *channels = NULL; -static wmem_tree_t *sep_list = NULL; -static wmem_tree_t *sep_open = NULL; -static wmem_tree_t *media_packet_times = NULL; +static wmem_tree_t *channels; +static wmem_tree_t *sep_list; +static wmem_tree_t *sep_open; +static wmem_tree_t *media_packet_times; /* A2DP declarations */ static gint proto_bta2dp; @@ -325,7 +325,7 @@ static dissector_handle_t mp2t_handle; static dissector_handle_t mpeg_audio_handle; static dissector_handle_t atrac_handle; -static bool force_a2dp_scms_t = false; +static bool force_a2dp_scms_t; static gint force_a2dp_codec = CODEC_DEFAULT; static const enum_val_t pref_a2dp_codec[] = { @@ -363,7 +363,7 @@ static int hf_btvdp_reserved; static dissector_handle_t h263_handle; static dissector_handle_t mp4v_es_handle; -static bool force_vdp_scms_t = false; +static bool force_vdp_scms_t; static gint force_vdp_codec = CODEC_H263_BASELINE; static const enum_val_t pref_vdp_codec[] = { diff --git a/epan/dissectors/packet-btavrcp.c b/epan/dissectors/packet-btavrcp.c index 6c8660c0ed..56efc0ce42 100644 --- a/epan/dissectors/packet-btavrcp.c +++ b/epan/dissectors/packet-btavrcp.c @@ -261,8 +261,8 @@ static dissector_handle_t btavrcp_handle; #define STATUS_OK 0x04 -static wmem_tree_t *reassembling = NULL; -static wmem_tree_t *timing = NULL; +static wmem_tree_t *reassembling; +static wmem_tree_t *timing; wmem_tree_t *btavrcp_song_positions = NULL; typedef struct _avrcp_proto_data_t { diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c index b346532906..216a0b6bc7 100644 --- a/epan/dissectors/packet-bthci_acl.c +++ b/epan/dissectors/packet-bthci_acl.c @@ -52,7 +52,7 @@ static expert_field ei_invalid_session; static expert_field ei_length_bad; static dissector_handle_t bthci_acl_handle; -static dissector_handle_t btl2cap_handle = NULL; +static dissector_handle_t btl2cap_handle; static bool acl_reassembly = true; @@ -68,7 +68,7 @@ typedef struct _chandle_data_t { wmem_tree_t *start_fragments; /* indexed by pinfo->num */ } chandle_data_t; -static wmem_tree_t *chandle_tree = NULL; +static wmem_tree_t *chandle_tree; static const value_string role_vals[] = { { 0, "Unknown" }, @@ -100,7 +100,7 @@ static const value_string bc_flag_vals[] = { { 0, NULL } }; -static guint32 invalid_session = 0; +static guint32 invalid_session; void proto_register_bthci_acl(void); diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c index 43b6bb5a9d..ea1a247c49 100644 --- a/epan/dissectors/packet-bthci_cmd.c +++ b/epan/dissectors/packet-bthci_cmd.c @@ -1153,7 +1153,7 @@ static dissector_table_t bluetooth_eir_ad_manufacturer_company_id; static dissector_table_t bluetooth_eir_ad_tds_organization_id; static dissector_table_t bluetooth_eir_ad_service_uuid; -wmem_tree_t *bthci_cmds = NULL; +wmem_tree_t *bthci_cmds; extern value_string_ext ext_usb_vendors_vals; extern value_string_ext ext_usb_products_vals; diff --git a/epan/dissectors/packet-bthci_iso.c b/epan/dissectors/packet-bthci_iso.c index da2320f7fc..9a4355bc67 100644 --- a/epan/dissectors/packet-bthci_iso.c +++ b/epan/dissectors/packet-bthci_iso.c @@ -63,7 +63,7 @@ typedef struct _chandle_data_t { wmem_tree_t *start_fragments; /* indexed by pinfo->num */ } chandle_data_t; -static wmem_tree_t *chandle_tree = NULL; +static wmem_tree_t *chandle_tree; static const value_string iso_pb_flag_vals[] = { { 0x00, "First SDU Fragment"}, diff --git a/epan/dissectors/packet-bthci_sco.c b/epan/dissectors/packet-bthci_sco.c index 85ab2acdd3..64a79ced0d 100644 --- a/epan/dissectors/packet-bthci_sco.c +++ b/epan/dissectors/packet-bthci_sco.c @@ -35,7 +35,7 @@ static int hf_bthci_sco_stream_number; /* Initialize the subtree pointers */ static gint ett_bthci_sco; -wmem_tree_t *bthci_sco_stream_numbers = NULL; +wmem_tree_t *bthci_sco_stream_numbers; static dissector_handle_t bthci_sco_handle; diff --git a/epan/dissectors/packet-bthcrp.c b/epan/dissectors/packet-bthcrp.c index 56fc2b6169..2b501cf173 100644 --- a/epan/dissectors/packet-bthcrp.c +++ b/epan/dissectors/packet-bthcrp.c @@ -60,9 +60,9 @@ static expert_field ei_bthcrp_unexpected_data; static dissector_handle_t bthcrp_handle; static gint force_client = FORCE_CLIENT_DEFAULT; -static gint psm_control = 0; -static gint psm_data_stream = 0; -static gint psm_notification = 0; +static gint psm_control; +static gint psm_data_stream; +static gint psm_notification; static const value_string control_pdu_id_vals[] = { { 0x0001, "CR_DataChannelCreditGrant" }, diff --git a/epan/dissectors/packet-bthfp.c b/epan/dissectors/packet-bthfp.c index 2e6bc45138..2296eb6a43 100644 --- a/epan/dissectors/packet-bthfp.c +++ b/epan/dissectors/packet-bthfp.c @@ -179,7 +179,7 @@ static gint ett_bthfp_xapl_accessory_info; static dissector_handle_t bthfp_handle; -static wmem_tree_t *fragments = NULL; +static wmem_tree_t *fragments; #define ROLE_UNKNOWN 0 #define ROLE_AG 1 diff --git a/epan/dissectors/packet-bthid.c b/epan/dissectors/packet-bthid.c index 77c0301835..ff3b02d4bc 100644 --- a/epan/dissectors/packet-bthid.c +++ b/epan/dissectors/packet-bthid.c @@ -46,7 +46,7 @@ static dissector_handle_t usb_hid_boot_keyboard_input_report_handle; static dissector_handle_t usb_hid_boot_keyboard_output_report_handle; static dissector_handle_t usb_hid_boot_mouse_input_report_handle; -static bool show_deprecated = false; +static bool show_deprecated; static const value_string transaction_type_vals[] = { { 0x00, "HANDSHAKE" }, diff --git a/epan/dissectors/packet-bthsp.c b/epan/dissectors/packet-bthsp.c index 13465629c8..45c941880d 100644 --- a/epan/dissectors/packet-bthsp.c +++ b/epan/dissectors/packet-bthsp.c @@ -52,7 +52,7 @@ static gint ett_bthsp_parameters; static dissector_handle_t bthsp_handle; -static wmem_tree_t *fragments = NULL; +static wmem_tree_t *fragments; #define ROLE_UNKNOWN 0 #define ROLE_AG 1 diff --git a/epan/dissectors/packet-btmesh.c b/epan/dissectors/packet-btmesh.c index 9ee61f4adf..15da28c03f 100644 --- a/epan/dissectors/packet-btmesh.c +++ b/epan/dissectors/packet-btmesh.c @@ -611,8 +611,8 @@ static dissector_table_t btmesh_model_vendor_dissector_table; * UAT for BT Mesh *------------------------------------- */ -static uat_t *btmesh_uat = NULL; -static guint num_btmesh_uat = 0; +static uat_t *btmesh_uat; +static guint num_btmesh_uat; /* UAT Network, Application and IVIndex entry structure. */ typedef struct { @@ -633,10 +633,10 @@ typedef struct { guint32 net_key_iv_index_hash; /* Used to identify net key / IV index pair */ } uat_btmesh_record_t; -static uat_btmesh_record_t *uat_btmesh_records = NULL; +static uat_btmesh_record_t *uat_btmesh_records; -static uat_t *btmesh_dev_key_uat = NULL; -static guint num_btmesh_dev_key_uat = 0; +static uat_t *btmesh_dev_key_uat; +static guint num_btmesh_dev_key_uat; /* UAT Device Key entry structure. */ typedef struct { @@ -649,10 +649,10 @@ typedef struct { guint8 valid; /* this counter must be equal to BTMESH_DEVICE_KEY_ENTRY_VALID make UAT entry valid */ } uat_btmesh_dev_key_record_t; -static uat_btmesh_dev_key_record_t *uat_btmesh_dev_key_records = NULL; +static uat_btmesh_dev_key_record_t *uat_btmesh_dev_key_records; -static uat_t * btmesh_label_uuid_uat = NULL; -static guint num_btmesh_label_uuid_uat = 0; +static uat_t * btmesh_label_uuid_uat; +static guint num_btmesh_label_uuid_uat; /* UAT Label UUID entry structure. */ typedef struct { @@ -663,7 +663,7 @@ typedef struct { guint8 valid; /* this counter must be equal to BTMESH_LABEL_UUID_ENTRY_VALID make UAT entry valid */ } uat_btmesh_label_uuid_record_t; -static uat_btmesh_label_uuid_record_t *uat_btmesh_label_uuid_records = NULL; +static uat_btmesh_label_uuid_record_t *uat_btmesh_label_uuid_records; typedef struct { guint16 property_id; diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c index 681365d973..0900ab579b 100644 --- a/epan/dissectors/packet-btrfcomm.c +++ b/epan/dissectors/packet-btrfcomm.c @@ -115,7 +115,7 @@ static dissector_handle_t btgnss_handle; static dissector_table_t rfcomm_dlci_dissector_table; -static wmem_tree_t *service_directions = NULL; +static wmem_tree_t *service_directions; typedef struct { guint32 direction; @@ -128,10 +128,10 @@ typedef struct { dissector_handle_t payload_proto; } uat_rfcomm_channels_t; -static bool rfcomm_channels_enabled = false; -static uat_t *uat_rfcomm_channels = NULL; -static uat_rfcomm_channels_t *rfcomm_channels = NULL; -static guint num_rfcomm_channels = 0; +static bool rfcomm_channels_enabled; +static uat_t *uat_rfcomm_channels; +static uat_rfcomm_channels_t *rfcomm_channels; +static guint num_rfcomm_channels; UAT_DEC_CB_DEF(rfcomm_channels, channel, uat_rfcomm_channels_t) UAT_DISSECTOR_DEF(rfcomm_channels, payload_proto, payload_proto, payload_proto_name, uat_rfcomm_channels_t) diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c index eb79e51c3f..074a037de2 100644 --- a/epan/dissectors/packet-btsdp.c +++ b/epan/dissectors/packet-btsdp.c @@ -568,10 +568,10 @@ static expert_field ei_length_bad; static dissector_handle_t btsdp_handle; -static wmem_tree_t *tid_requests = NULL; -static wmem_tree_t *continuation_states = NULL; -static wmem_tree_t *record_handle_services = NULL; -static wmem_tree_t *service_infos = NULL; +static wmem_tree_t *tid_requests; +static wmem_tree_t *continuation_states; +static wmem_tree_t *record_handle_services; +static wmem_tree_t *service_infos; typedef struct _tid_request_t { guint32 interface_id; diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c index 2b387abcb1..f3a7034e52 100644 --- a/epan/dissectors/packet-bvlc.c +++ b/epan/dissectors/packet-bvlc.c @@ -90,8 +90,8 @@ static int hf_bscvlc_connect_uuid; static dissector_table_t bvlc_dissector_table; static dissector_table_t bscvlc_dissector_table; static dissector_table_t bvlc_ipv6_dissector_table; -static dissector_handle_t bvlc_handle = NULL; -static dissector_handle_t bscvlc_handle = NULL; +static dissector_handle_t bvlc_handle; +static dissector_handle_t bscvlc_handle; static const value_string bvlc_function_names[] = { { 0x00, "BVLC-Result" }, diff --git a/epan/dissectors/packet-bzr.c b/epan/dissectors/packet-bzr.c index 4aa2bf5f39..8ac3b3eee9 100644 --- a/epan/dissectors/packet-bzr.c +++ b/epan/dissectors/packet-bzr.c @@ -37,7 +37,7 @@ static gint hf_bzr_packet_protocol_version; static gint hf_bzr_packet_kind; static dissector_handle_t bencode_handle; -static dissector_handle_t bzr_handle = NULL; +static dissector_handle_t bzr_handle; #define REQUEST_VERSION_TWO "bzr request 2\n" #define RESPONSE_VERSION_TWO "bzr response 2\n" diff --git a/epan/dissectors/packet-c1222.c b/epan/dissectors/packet-c1222.c index 166b5e82a6..760a54dc41 100644 --- a/epan/dissectors/packet-c1222.c +++ b/epan/dissectors/packet-c1222.c @@ -71,8 +71,8 @@ void proto_register_c1222(void); -static dissector_handle_t c1222_handle=NULL; -static dissector_handle_t c1222_udp_handle=NULL; +static dissector_handle_t c1222_handle; +static dissector_handle_t c1222_udp_handle; /* Initialize the protocol and registered fields */ static int proto_c1222; @@ -171,43 +171,43 @@ static int ett_c1222_crypto; static int ett_c1222_cmd; /* these pointers are for the header elements that may be needed to verify the crypto */ -static guint8 *aSO_context = NULL; -static guint8 *called_AP_title = NULL; -static guint8 *called_AP_invocation_id = NULL; -static guint8 *calling_AE_qualifier = NULL; -static guint8 *calling_AP_invocation_id = NULL; -static guint8 *mechanism_name = NULL; -static guint8 *calling_authentication_value = NULL; -static guint8 *user_information = NULL; -static guint8 *calling_AP_title = NULL; -static guint8 *key_id_element = NULL; -static guint8 *iv_element = NULL; +static guint8 *aSO_context; +static guint8 *called_AP_title; +static guint8 *called_AP_invocation_id; +static guint8 *calling_AE_qualifier; +static guint8 *calling_AP_invocation_id; +static guint8 *mechanism_name; +static guint8 *calling_authentication_value; +static guint8 *user_information; +static guint8 *calling_AP_title; +static guint8 *key_id_element; +static guint8 *iv_element; /* these are the related lengths */ -static guint32 aSO_context_len = 0; -static guint32 called_AP_title_len = 0; -static guint32 called_AP_invocation_id_len = 0; -static guint32 calling_AE_qualifier_len = 0; -static guint32 calling_AP_invocation_id_len = 0; -static guint32 mechanism_name_len = 0; -static guint32 calling_authentication_value_len = 0; -static guint32 user_information_len = 0; -static guint32 calling_AP_title_len = 0; -static guint32 key_id_element_len = 0; -static guint32 iv_element_len = 0; +static guint32 aSO_context_len; +static guint32 called_AP_title_len; +static guint32 called_AP_invocation_id_len; +static guint32 calling_AE_qualifier_len; +static guint32 calling_AP_invocation_id_len; +static guint32 mechanism_name_len; +static guint32 calling_authentication_value_len; +static guint32 user_information_len; +static guint32 calling_AP_title_len; +static guint32 key_id_element_len; +static guint32 iv_element_len; /* these are the related allocation sizes (which might be different from the lengths) */ -static guint32 aSO_context_allocated = 0; -static guint32 called_AP_title_allocated = 0; -static guint32 called_AP_invocation_id_allocated = 0; -static guint32 calling_AE_qualifier_allocated = 0; -static guint32 calling_AP_invocation_id_allocated = 0; -static guint32 mechanism_name_allocated = 0; -static guint32 calling_authentication_value_allocated = 0; -static guint32 user_information_allocated = 0; -static guint32 calling_AP_title_allocated = 0; -static guint32 key_id_element_allocated = 0; -static guint32 iv_element_allocated = 0; +static guint32 aSO_context_allocated; +static guint32 called_AP_title_allocated; +static guint32 called_AP_invocation_id_allocated; +static guint32 calling_AE_qualifier_allocated; +static guint32 calling_AP_invocation_id_allocated; +static guint32 mechanism_name_allocated; +static guint32 calling_authentication_value_allocated; +static guint32 user_information_allocated; +static guint32 calling_AP_title_allocated; +static guint32 key_id_element_allocated; +static guint32 iv_element_allocated; static gint ett_c1222_MESSAGE_U; static gint ett_c1222_Called_AP_title; @@ -231,10 +231,10 @@ static expert_field ei_c1222_mac_missing; /* Preferences */ static bool c1222_desegment = true; static bool c1222_decrypt = true; -static bool c1222_big_endian = false; -static const gchar *c1222_baseoid_str = NULL; -static guint8 *c1222_baseoid = NULL; -static guint c1222_baseoid_len = 0; +static bool c1222_big_endian; +static const gchar *c1222_baseoid_str; +static guint8 *c1222_baseoid; +static guint c1222_baseoid_len; /*------------------------------ * Data Structures @@ -340,8 +340,8 @@ typedef struct _c1222_uat_data { UAT_HEX_CB_DEF(c1222_users, keynum, c1222_uat_data_t) UAT_BUFFER_CB_DEF(c1222_users, key, c1222_uat_data_t, key, keylen) -static c1222_uat_data_t *c1222_uat_data = NULL; -static guint num_c1222_uat_data = 0; +static c1222_uat_data_t *c1222_uat_data; +static guint num_c1222_uat_data; static uat_t *c1222_uat; /* these macros ares used to populate fields needed to verify crypto */ diff --git a/epan/dissectors/packet-c15ch.c b/epan/dissectors/packet-c15ch.c index ecb24d05e9..8f93f44850 100644 --- a/epan/dissectors/packet-c15ch.c +++ b/epan/dissectors/packet-c15ch.c @@ -132,12 +132,12 @@ static gint ett_c15ch_second_level_sub3; static gint ett_c15ch_second_level_sub4; static int proto_c15ch_second_level; -static dissector_handle_t c15ch_hbeat_handle = NULL; -static dissector_handle_t c15ch_handle = NULL; +static dissector_handle_t c15ch_hbeat_handle; +static dissector_handle_t c15ch_handle; -static dissector_handle_t general_sccp_handle = NULL; -static dissector_handle_t general_isup_handle = NULL; -static dissector_handle_t general_q931_handle = NULL; +static dissector_handle_t general_sccp_handle; +static dissector_handle_t general_isup_handle; +static dissector_handle_t general_q931_handle; /* ama */ /* Fields */ @@ -3011,7 +3011,7 @@ static const value_string c15inc_gwe_task_types[] = { }; #if 0 -static const guint8 INVALID_TASK_TYPE_VAL = 0; +static const guint8 INVALID_TASK_TYPE_VAL; #endif static const value_string c15inc_gwe_bc_fiat_types[] = { diff --git a/epan/dissectors/packet-calcappprotocol.c b/epan/dissectors/packet-calcappprotocol.c index 98401fd4b2..2e00190885 100644 --- a/epan/dissectors/packet-calcappprotocol.c +++ b/epan/dissectors/packet-calcappprotocol.c @@ -38,8 +38,8 @@ static int hf_message_jobid; static int hf_message_jobsize; static int hf_message_completed; -static guint64 calcappprotocol_total_msgs = 0; -static guint64 calcappprotocol_total_bytes = 0; +static guint64 calcappprotocol_total_msgs; +static guint64 calcappprotocol_total_bytes; /* Initialize the subtree pointers */ static gint ett_calcappprotocol; diff --git a/epan/dissectors/packet-camel.c b/epan/dissectors/packet-camel.c index bfa87c2db1..d54af7ef0f 100644 --- a/epan/dissectors/packet-camel.c +++ b/epan/dissectors/packet-camel.c @@ -59,7 +59,7 @@ static int camel_tap; /* Global variables */ static guint32 opcode=0; static guint32 errorCode=0; -static guint32 camel_ver = 0; +static guint32 camel_ver; /* When several Camel components are received in a single TCAP message, we have to use several buffers for the stored parameters @@ -850,11 +850,11 @@ static dissector_handle_t camel_v4_handle; static guint8 PDPTypeOrganization; static guint8 PDPTypeNumber; -const char *camel_obj_id = NULL; -gboolean is_ExtensionField =FALSE; +const char *camel_obj_id; +gboolean is_ExtensionField; /* Global hash tables*/ -static wmem_map_t *srt_calls = NULL; +static wmem_map_t *srt_calls; static guint32 camelsrt_global_SessionId=1; static int camel_opcode_type; @@ -8097,8 +8097,8 @@ camelsrt_razinfo(void) } -static guint8 camel_pdu_type = 0; -static guint8 camel_pdu_size = 0; +static guint8 camel_pdu_type; +static guint8 camel_pdu_size; static int diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c index 9abf03df13..1c291e35bf 100644 --- a/epan/dissectors/packet-capwap.c +++ b/epan/dissectors/packet-capwap.c @@ -29,8 +29,8 @@ static dissector_handle_t capwap_data_handle; #define UDP_PORT_CAPWAP_CONTROL 5246 #define UDP_PORT_CAPWAP_DATA 5247 -static range_t *global_capwap_data_udp_ports = NULL; -static bool global_capwap_draft_8_cisco = false; +static range_t *global_capwap_data_udp_ports; +static bool global_capwap_draft_8_cisco; static bool global_capwap_reassemble = true; static bool global_capwap_swap_frame_control = true; diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index 59ff7b63f2..04c68be2f1 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -134,8 +134,8 @@ static bool catapult_dct2000_try_ipprim_heuristic = true; static bool catapult_dct2000_try_sctpprim_heuristic = true; static bool catapult_dct2000_dissect_lte_rrc = true; static bool catapult_dct2000_dissect_mac_lte_oob_messages = true; -static bool catapult_dct2000_dissect_old_protocol_names = false; -static bool catapult_dct2000_use_protocol_name_as_dissector_name = false; +static bool catapult_dct2000_dissect_old_protocol_names; +static bool catapult_dct2000_use_protocol_name_as_dissector_name; /* Protocol subtree. */ static int ett_catapult_dct2000; diff --git a/epan/dissectors/packet-cdt.c b/epan/dissectors/packet-cdt.c index 7b91eee1d2..829d442258 100644 --- a/epan/dissectors/packet-cdt.c +++ b/epan/dissectors/packet-cdt.c @@ -43,10 +43,10 @@ void proto_register_cdt(void); void proto_reg_handoff_cdt(void); -static proto_tree *top_tree = NULL; -static proto_item *cdt_item = NULL; +static proto_tree *top_tree; +static proto_item *cdt_item; -static guint32 content_type = 0; +static guint32 content_type; /* Initialize the protocol and registered fields */ static int proto_cdt; diff --git a/epan/dissectors/packet-cesoeth.c b/epan/dissectors/packet-cesoeth.c index 5dca2c980e..ef6b9fe887 100644 --- a/epan/dissectors/packet-cesoeth.c +++ b/epan/dissectors/packet-cesoeth.c @@ -97,7 +97,7 @@ static const value_string l1_m_names[] = }; /* Preferences */ -static bool has_rtp_header = false; +static bool has_rtp_header; static bool heuristic_rtp_header = true; diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c index 8ea4191ab1..c837574901 100644 --- a/epan/dissectors/packet-chdlc.c +++ b/epan/dissectors/packet-chdlc.c @@ -149,7 +149,7 @@ chdlctype(dissector_handle_t sub_dissector, guint16 chdlc_type, } } -static gint chdlc_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */ +static gint chdlc_fcs_decode; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */ static int dissect_chdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) diff --git a/epan/dissectors/packet-cigi.c b/epan/dissectors/packet-cigi.c index 3e94271aba..c4891a8999 100644 --- a/epan/dissectors/packet-cigi.c +++ b/epan/dissectors/packet-cigi.c @@ -3805,8 +3805,8 @@ static const char *global_ig_ip; static gint ett_cigi; /* The version of cigi to use */ -static gint cigi_version = 0; -static gint cigi_minor_version = 0; +static gint cigi_version; +static gint cigi_minor_version; /* The byte order of cigi to use; our default is big-endian */ static gint cigi_byte_order = ENC_BIG_ENDIAN; diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c index db00ad21dd..2d51933e45 100644 --- a/epan/dissectors/packet-cip.c +++ b/epan/dissectors/packet-cip.c @@ -6850,7 +6850,7 @@ typedef struct cip_gaa_val { wmem_list_t *attributes; } cip_gaa_val_t; -static wmem_map_t *cip_gaa_hashtable = NULL; +static wmem_map_t *cip_gaa_hashtable; static guint cip_gaa_hash (gconstpointer v) diff --git a/epan/dissectors/packet-cipmotion.c b/epan/dissectors/packet-cipmotion.c index edae867ab6..ed93e2bf36 100644 --- a/epan/dissectors/packet-cipmotion.c +++ b/epan/dissectors/packet-cipmotion.c @@ -311,7 +311,7 @@ static expert_field ei_format_rev_conn_pt; static dissector_handle_t cipmotion_handle; static dissector_handle_t cipmotion3_handle; -static bool display_full_attribute_data = false; +static bool display_full_attribute_data; /* These are the BITMASKS for the Time Data Set header field */ #define TIME_DATA_SET_TIME_STAMP 0x1 diff --git a/epan/dissectors/packet-cisco-fp-mim.c b/epan/dissectors/packet-cisco-fp-mim.c index e91c6a3159..2797ee6632 100644 --- a/epan/dissectors/packet-cisco-fp-mim.c +++ b/epan/dissectors/packet-cisco-fp-mim.c @@ -26,7 +26,7 @@ void proto_register_mim(void); void proto_reg_handoff_fabricpath(void); -static bool fp_check_fcs = false; +static bool fp_check_fcs; static int proto_fp; static gint ett_mim; diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c index f71e8f8941..99a042b1ce 100644 --- a/epan/dissectors/packet-clnp.c +++ b/epan/dissectors/packet-clnp.c @@ -181,7 +181,7 @@ static reassembly_table clnp_reassembly_table; /* options */ static guint tp_nsap_selector = NSEL_TP; -static bool always_decode_transport = false; +static bool always_decode_transport; static bool clnp_reassemble = true; /* function definitions */ diff --git a/epan/dissectors/packet-cmip.c b/epan/dissectors/packet-cmip.c index 34547d0c42..4d17b00256 100644 --- a/epan/dissectors/packet-cmip.c +++ b/epan/dissectors/packet-cmip.c @@ -450,7 +450,7 @@ static expert_field ei_wrong_spdu_type; static guint32 opcode; -static dissector_handle_t cmip_handle = NULL; +static dissector_handle_t cmip_handle; /* Dissector table */ static dissector_table_t attribute_id_dissector_table; diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c index 90ec5d2551..3bca9c16ee 100644 --- a/epan/dissectors/packet-cmp.c +++ b/epan/dissectors/packet-cmp.c @@ -49,8 +49,8 @@ static dissector_handle_t cmp_tcp_handle; /* desegmentation of CMP over TCP */ static bool cmp_desegment = true; -static guint cmp_alternate_http_port = 0; -static guint cmp_alternate_tcp_style_http_port = 0; +static guint cmp_alternate_http_port; +static guint cmp_alternate_tcp_style_http_port; /* Initialize the protocol and registered fields */ static int proto_cmp; diff --git a/epan/dissectors/packet-cms.c b/epan/dissectors/packet-cms.c index fe1c3f976c..1af3cb2320 100644 --- a/epan/dissectors/packet-cms.c +++ b/epan/dissectors/packet-cms.c @@ -309,7 +309,7 @@ static gint ett_cms_CurrentFWConfig; static gint ett_cms_HardwareModuleName; static gint ett_cms_FirmwarePackageMessageDigest; -static dissector_handle_t cms_handle = NULL; +static dissector_handle_t cms_handle; static int dissect_cms_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2wrs stops generating these silly wrappers */ @@ -318,8 +318,8 @@ struct cms_private_data { tvbuff_t *content_tvb; }; -static proto_tree *top_tree=NULL; -static proto_tree *cap_tree=NULL; +static proto_tree *top_tree; +static proto_tree *cap_tree; #define HASH_SHA1 "1.3.14.3.2.26" diff --git a/epan/dissectors/packet-communityid.c b/epan/dissectors/packet-communityid.c index 797aa20977..dd172b59a1 100644 --- a/epan/dissectors/packet-communityid.c +++ b/epan/dissectors/packet-communityid.c @@ -417,7 +417,7 @@ static dissector_handle_t communityid_handle; /* Config settings as handled by Wireshark's preference framework ... */ static bool pref_cid_do_base64 = true; -static guint pref_cid_seed = 0; +static guint pref_cid_seed; /* ... and as interpreted by the Community ID code. */ static communityid_cfg_t cid_cfg; diff --git a/epan/dissectors/packet-componentstatus.c b/epan/dissectors/packet-componentstatus.c index 0848c52cff..64a3ee02c4 100644 --- a/epan/dissectors/packet-componentstatus.c +++ b/epan/dissectors/packet-componentstatus.c @@ -52,8 +52,8 @@ static int hf_message_sender_id_group; static int hf_message_sender_id_object; static int hf_message_sender_timestamp; -static guint64 componentstatusprotocol_total_msgs = 0; -static guint64 componentstatusprotocol_total_bytes = 0; +static guint64 componentstatusprotocol_total_msgs; +static guint64 componentstatusprotocol_total_bytes; #define COMPONENTSTATUS_REPORT 0x01 diff --git a/epan/dissectors/packet-corosync-totemnet.c b/epan/dissectors/packet-corosync-totemnet.c index e9e534ffb3..007466de06 100644 --- a/epan/dissectors/packet-corosync-totemnet.c +++ b/epan/dissectors/packet-corosync-totemnet.c @@ -45,8 +45,8 @@ static int hf_corosync_totemnet_security_crypto_type; static int hf_corosync_totemnet_security_crypto_key; /* configurable parameters */ -static gchar* corosync_totemnet_private_keys = NULL; -static gchar** corosync_totemnet_private_keys_list = NULL; +static gchar* corosync_totemnet_private_keys; +static gchar** corosync_totemnet_private_keys_list; /* Initialize the subtree pointers */ static gint ett_corosync_totemnet_security_header; diff --git a/epan/dissectors/packet-cose.c b/epan/dissectors/packet-cose.c index 4ee259a2be..fba5d5d3c1 100644 --- a/epan/dissectors/packet-cose.c +++ b/epan/dissectors/packet-cose.c @@ -40,31 +40,31 @@ static int proto_cose; static int proto_cose_params; /// Dissect opaque CBOR data -static dissector_handle_t handle_cbor = NULL; +static dissector_handle_t handle_cbor; /// Dissector handles -static dissector_handle_t handle_cose_msg_hdr = NULL; -static dissector_handle_t handle_cose_msg_tagged = NULL; -static dissector_handle_t handle_cose_sign = NULL; -static dissector_handle_t handle_cose_sign_media_type = NULL; -static dissector_handle_t handle_cose_sign1 = NULL; -static dissector_handle_t handle_cose_sign1_media_type = NULL; -static dissector_handle_t handle_cose_encrypt = NULL; -static dissector_handle_t handle_cose_encrypt_media_type = NULL; -static dissector_handle_t handle_cose_encrypt0 = NULL; -static dissector_handle_t handle_cose_encrypt0_media_type = NULL; -static dissector_handle_t handle_cose_mac = NULL; -static dissector_handle_t handle_cose_mac_media_type = NULL; -static dissector_handle_t handle_cose_mac0 = NULL; -static dissector_handle_t handle_cose_mac0_media_type = NULL; -static dissector_handle_t handle_cose_key = NULL; -static dissector_handle_t handle_cose_key_set = NULL; +static dissector_handle_t handle_cose_msg_hdr; +static dissector_handle_t handle_cose_msg_tagged; +static dissector_handle_t handle_cose_sign; +static dissector_handle_t handle_cose_sign_media_type; +static dissector_handle_t handle_cose_sign1; +static dissector_handle_t handle_cose_sign1_media_type; +static dissector_handle_t handle_cose_encrypt; +static dissector_handle_t handle_cose_encrypt_media_type; +static dissector_handle_t handle_cose_encrypt0; +static dissector_handle_t handle_cose_encrypt0_media_type; +static dissector_handle_t handle_cose_mac; +static dissector_handle_t handle_cose_mac_media_type; +static dissector_handle_t handle_cose_mac0; +static dissector_handle_t handle_cose_mac0_media_type; +static dissector_handle_t handle_cose_key; +static dissector_handle_t handle_cose_key_set; /// Dissect opaque data -static dissector_table_t table_media = NULL; +static dissector_table_t table_media; /// Dissect extension items -static dissector_table_t table_cose_msg_tag = NULL; -static dissector_table_t table_header = NULL; -static dissector_table_t table_keyparam = NULL; +static dissector_table_t table_cose_msg_tag; +static dissector_table_t table_header; +static dissector_table_t table_keyparam; static const val64_string alg_vals[] = { {-65535, "RS1"}, diff --git a/epan/dissectors/packet-ctdb.c b/epan/dissectors/packet-ctdb.c index 1884ede026..853c8189d1 100644 --- a/epan/dissectors/packet-ctdb.c +++ b/epan/dissectors/packet-ctdb.c @@ -66,7 +66,7 @@ static gint ett_ctdb_key; static expert_field ei_ctdb_too_many_nodes; /* this tree keeps track of caller/reqid for ctdb transactions */ -static wmem_tree_t *ctdb_transactions=NULL; +static wmem_tree_t *ctdb_transactions; typedef struct _ctdb_trans_t { guint32 key_hash; guint32 request_in; @@ -75,7 +75,7 @@ typedef struct _ctdb_trans_t { } ctdb_trans_t; /* this tree keeps track of CONTROL request/responses */ -static wmem_tree_t *ctdb_controls=NULL; +static wmem_tree_t *ctdb_controls; typedef struct _ctdb_control_t { guint32 opcode; guint32 request_in; diff --git a/epan/dissectors/packet-data.c b/epan/dissectors/packet-data.c index 9c3c0603cb..68d2cd8d30 100644 --- a/epan/dissectors/packet-data.c +++ b/epan/dissectors/packet-data.c @@ -32,10 +32,10 @@ static int hf_data_text; static int hf_data_uncompressed_data; static int hf_data_uncompressed_len; -static bool new_pane = false; -static bool uncompress_data = false; -static bool show_as_text = false; -static bool generate_md5_hash = false; +static bool new_pane; +static bool uncompress_data; +static bool show_as_text; +static bool generate_md5_hash; static gint ett_data; diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index fd47d54a88..00689498ed 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -311,7 +311,7 @@ static heur_dissector_list_t heur_subdissector_list; /* preferences */ static bool dccp_summary_in_tree = true; -static bool try_heuristic_first = false; +static bool try_heuristic_first; static bool dccp_check_checksum = true; static bool dccp_relative_seq = true; static guint32 dccp_stream_count; diff --git a/epan/dissectors/packet-dcerpc-bossvr.c b/epan/dissectors/packet-dcerpc-bossvr.c index 5f447bd116..46877937de 100644 --- a/epan/dissectors/packet-dcerpc-bossvr.c +++ b/epan/dissectors/packet-dcerpc-bossvr.c @@ -30,7 +30,7 @@ static gint ett_bossvr; static e_guid_t uuid_bossvr = { 0x4d37f2dd, 0xed43, 0x0000, { 0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x00, 0x01 } }; -static guint16 ver_bossvr = 0; +static guint16 ver_bossvr; static dcerpc_sub_dissector bossvr_dissectors[] = { diff --git a/epan/dissectors/packet-dcerpc-browser.c b/epan/dissectors/packet-dcerpc-browser.c index cdd1183bb1..596d2162dd 100644 --- a/epan/dissectors/packet-dcerpc-browser.c +++ b/epan/dissectors/packet-dcerpc-browser.c @@ -63,7 +63,7 @@ static e_guid_t uuid_dcerpc_browser = { { 0x98, 0x33, 0x01, 0x28, 0x92, 0x02, 0x01, 0x62 } }; -static guint16 ver_dcerpc_browser = 0; +static guint16 ver_dcerpc_browser; /* diff --git a/epan/dissectors/packet-dcerpc-netlogon.c b/epan/dissectors/packet-dcerpc-netlogon.c index bc74a77440..2de9e5509d 100644 --- a/epan/dissectors/packet-dcerpc-netlogon.c +++ b/epan/dissectors/packet-dcerpc-netlogon.c @@ -90,7 +90,7 @@ static void printnbyte(const guint8* tab _U_,int nb _U_,const char* txt _U_,cons #define NETLOGON_FLAG_2 0x2 #define NETLOGON_FLAG_1 0x1 -static wmem_map_t *netlogon_auths=NULL; +static wmem_map_t *netlogon_auths; #if 0 static wmem_map_t *schannel_auths; #endif diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index a84bf1996f..00c16fd0e4 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -510,7 +510,7 @@ typedef struct { pol_value *list; /* List of policy handle entries */ } pol_hash_value; -static wmem_map_t *pol_hash = NULL; +static wmem_map_t *pol_hash; /* Hash function */ diff --git a/epan/dissectors/packet-dcerpc-rras.c b/epan/dissectors/packet-dcerpc-rras.c index 01c37e6f2a..4ee1f849b8 100644 --- a/epan/dissectors/packet-dcerpc-rras.c +++ b/epan/dissectors/packet-dcerpc-rras.c @@ -35,7 +35,7 @@ static e_guid_t uuid_dcerpc_rras = { { 0xbb, 0xd2, 0x00, 0x00, 0x1a, 0x18, 0x1c, 0xad } }; -static guint16 ver_dcerpc_rras = 0; +static guint16 ver_dcerpc_rras; static dcerpc_sub_dissector dcerpc_rras_dissectors[] = { diff --git a/epan/dissectors/packet-dcerpc-rs_attr.c b/epan/dissectors/packet-dcerpc-rs_attr.c index ac13008247..5c92d66629 100644 --- a/epan/dissectors/packet-dcerpc-rs_attr.c +++ b/epan/dissectors/packet-dcerpc-rs_attr.c @@ -29,7 +29,7 @@ static gint ett_rs_attr; static e_guid_t uuid_rs_attr = { 0xa71fc1e8, 0x567f, 0x11cb, { 0x98, 0xa0, 0x08, 0x00, 0x1e, 0x04, 0xde, 0x8c } }; -static guint16 ver_rs_attr = 0; +static guint16 ver_rs_attr; static dcerpc_sub_dissector rs_attr_dissectors[] = { diff --git a/epan/dissectors/packet-dcerpc-rs_attr_schema.c b/epan/dissectors/packet-dcerpc-rs_attr_schema.c index baa51e0a90..299c727a1f 100644 --- a/epan/dissectors/packet-dcerpc-rs_attr_schema.c +++ b/epan/dissectors/packet-dcerpc-rs_attr_schema.c @@ -29,7 +29,7 @@ static gint ett_rs_attr_schema; static e_guid_t uuid_rs_attr_schema = { 0xb47c9460, 0x567f, 0x11cb, {0x8c, 0x09, 0x08, 0x00, 0x1e, 0x04, 0xde, 0x8c} }; -static guint16 ver_rs_attr_schema = 0; +static guint16 ver_rs_attr_schema; static dcerpc_sub_dissector rs_attr_schema_dissectors[] = { diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 21ab6d3256..3b2ce1b8e8 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -686,9 +686,9 @@ static expert_field ei_dcerpc_cn_rts_command; static expert_field ei_dcerpc_not_implemented; static const guint8 TRAILER_SIGNATURE[] = {0x8a, 0xe3, 0x13, 0x71, 0x02, 0xf4, 0x36, 0x71}; -static tvbuff_t *tvb_trailer_signature = NULL; +static tvbuff_t *tvb_trailer_signature; -static GSList *decode_dcerpc_bindings = NULL; +static GSList *decode_dcerpc_bindings; /* * To keep track of ctx_id mappings. * @@ -696,7 +696,7 @@ static GSList *decode_dcerpc_bindings = NULL; * Note that we always specify a SMB FID. For non-SMB transports this * value is 0. */ -static wmem_map_t *dcerpc_binds = NULL; +static wmem_map_t *dcerpc_binds; typedef struct _dcerpc_bind_key { conversation_t *conv; @@ -710,7 +710,7 @@ typedef struct _dcerpc_bind_value { e_guid_t transport; } dcerpc_bind_value; -static wmem_map_t *dcerpc_auths = NULL; +static wmem_map_t *dcerpc_auths; typedef struct _dcerpc_auth_context { conversation_t *conv; @@ -1344,7 +1344,7 @@ typedef struct _dcerpc_dissector_data static dissector_table_t uuid_dissector_table; /* the registered subdissectors */ -GHashTable *dcerpc_uuids = NULL; +GHashTable *dcerpc_uuids; static gint dcerpc_uuid_equal(gconstpointer k1, gconstpointer k2) @@ -1872,8 +1872,8 @@ dcerpc_auth_context_hash(gconstpointer k) * To keep track of callid mappings. Should really use some generic * conversation support instead. */ -static wmem_map_t *dcerpc_cn_calls = NULL; -static wmem_map_t *dcerpc_dg_calls = NULL; +static wmem_map_t *dcerpc_cn_calls; +static wmem_map_t *dcerpc_dg_calls; typedef struct _dcerpc_cn_call_key { conversation_t *conv; @@ -1942,7 +1942,7 @@ dcerpc_dg_call_hash(gconstpointer k) XXX - why not just use the same keys as are used for calls? */ -static wmem_map_t *dcerpc_matched = NULL; +static wmem_map_t *dcerpc_matched; typedef struct _dcerpc_matched_key { guint32 frame; @@ -2950,14 +2950,14 @@ dissect_ndr_wchar_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, * Instead of re-calculating the size every time, use the stored value unless this * flag is set which means: re-read the size of the list */ -static gboolean must_check_size = FALSE; +static gboolean must_check_size; /* * List of pointers encountered so far in the current level. Points to an * element of list_ndr_pointer_list. */ -static GSList *ndr_pointer_list = NULL; +static GSList *ndr_pointer_list; -static GHashTable *ndr_pointer_hash = NULL; +static GHashTable *ndr_pointer_hash; /* * List of pointer list, in order to avoid huge performance penalty * when dealing with list bigger than 100 elements due to the way we @@ -2965,7 +2965,7 @@ static GHashTable *ndr_pointer_hash = NULL; * We instead maintain a stack of pointer list * To make it easier to manage we just use a list to materialize the stack */ -static GSList *list_ndr_pointer_list = NULL; +static GSList *list_ndr_pointer_list; /* Boolean controlling whether pointers are top-level or embedded */ static gboolean pointers_are_top_level = TRUE; diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c index e691baace3..1eccad89f5 100644 --- a/epan/dissectors/packet-dcm.c +++ b/epan/dissectors/packet-dcm.c @@ -273,13 +273,13 @@ static bool global_dcm_export_header = true; static guint global_dcm_export_minsize = 4096; /* Filter small objects in export */ static bool global_dcm_seq_subtree = true; -static bool global_dcm_tag_subtree = false; /* Only useful for debugging */ +static bool global_dcm_tag_subtree; /* Only useful for debugging */ static bool global_dcm_cmd_details = true; /* Show details in header and info column */ static bool global_dcm_reassemble = true; /* Merge fragmented PDVs */ -static wmem_map_t *dcm_tag_table = NULL; -static wmem_map_t *dcm_uid_table = NULL; -static wmem_map_t *dcm_status_table = NULL; +static wmem_map_t *dcm_tag_table; +static wmem_map_t *dcm_uid_table; +static wmem_map_t *dcm_status_table; /* Initialize the protocol and registered fields */ static int proto_dcm; diff --git a/epan/dissectors/packet-dcom-dispatch.c b/epan/dissectors/packet-dcom-dispatch.c index feeed27a59..7514fab8ab 100644 --- a/epan/dissectors/packet-dcom-dispatch.c +++ b/epan/dissectors/packet-dcom-dispatch.c @@ -70,7 +70,7 @@ static gint ett_dispatch_params; static gint ett_dispatch_excepinfo; static e_guid_t uuid_dispatch = { 0x00020400, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; -static guint16 ver_dispatch = 0; +static guint16 ver_dispatch; static gint ett_dispatch; static int proto_dispatch; diff --git a/epan/dissectors/packet-dcom-oxid.c b/epan/dissectors/packet-dcom-oxid.c index 60ebf13f25..b5b74bd5ed 100644 --- a/epan/dissectors/packet-dcom-oxid.c +++ b/epan/dissectors/packet-dcom-oxid.c @@ -44,7 +44,7 @@ static int hf_oxid_ds_array; static gint ett_oxid; static e_guid_t uuid_oxid = { 0x99fcfec4, 0x5260, 0x101b, { 0xbb, 0xcb, 0x00, 0xaa, 0x00, 0x21, 0x34, 0x7a } }; -static guint16 ver_oxid = 0; +static guint16 ver_oxid; static int diff --git a/epan/dissectors/packet-dcom-provideclassinfo.c b/epan/dissectors/packet-dcom-provideclassinfo.c index 8e7ae63750..d1e91d0c60 100644 --- a/epan/dissectors/packet-dcom-provideclassinfo.c +++ b/epan/dissectors/packet-dcom-provideclassinfo.c @@ -25,7 +25,7 @@ static int hf_provideclassinfo_opnum; static int hf_typeinfo; static e_guid_t uuid_provideclassinfo = { 0xb196b283, 0xbab4, 0x101a, { 0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07} }; -static guint16 ver_provideclassinfo = 0; +static guint16 ver_provideclassinfo; static gint ett_provideclassinfo; static int proto_provideclassinfo; diff --git a/epan/dissectors/packet-dcom-remact.c b/epan/dissectors/packet-dcom-remact.c index 9193928d4b..b79b31a6a3 100644 --- a/epan/dissectors/packet-dcom-remact.c +++ b/epan/dissectors/packet-dcom-remact.c @@ -39,7 +39,7 @@ static int hf_remact_authn_hint; static int proto_remact; static gint ett_remact; static e_guid_t uuid_remact = { 0x4d9f4ab8, 0x7d1c, 0x11cf, { 0x86, 0x1e, 0x00, 0x20, 0xaf, 0x6e, 0x7c, 0x57 } }; -static guint16 ver_remact = 0; +static guint16 ver_remact; static int diff --git a/epan/dissectors/packet-dcom-remunkn.c b/epan/dissectors/packet-dcom-remunkn.c index 702e20d4c8..fbfee503fd 100644 --- a/epan/dissectors/packet-dcom-remunkn.c +++ b/epan/dissectors/packet-dcom-remunkn.c @@ -41,7 +41,7 @@ static gint ett_remunk_rqi_result; static gint ett_remunk; static e_guid_t uuid_remunk = { 0x00000131, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; -static guint16 ver_remunk = 0; +static guint16 ver_remunk; static int proto_remunk; static e_guid_t ipid_remunk = { 0x00000131, 0x1234, 0x5678, { 0xCA, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; @@ -54,7 +54,7 @@ static e_guid_t ipid_remunk = { 0x00000131, 0x1234, 0x5678, { 0xCA, 0xFE, 0x00, static gint ett_remunk2; static e_guid_t uuid_remunk2 = { 0x00000143, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; -static guint16 ver_remunk2 = 0; +static guint16 ver_remunk2; static int proto_remunk2; diff --git a/epan/dissectors/packet-dcom-sysact.c b/epan/dissectors/packet-dcom-sysact.c index 4603837e1b..3ce6c78542 100644 --- a/epan/dissectors/packet-dcom-sysact.c +++ b/epan/dissectors/packet-dcom-sysact.c @@ -126,7 +126,7 @@ static int hf_typesz_filler; static int hf_typesz_buflen; static e_guid_t uuid_ISystemActivator = { 0x000001a0, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; -static guint16 ver_ISystemActivator = 0; +static guint16 ver_ISystemActivator; /*static e_guid_t clsid_ActivationPropertiesIn = { 0x00000338, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };*/ /*static e_guid_t clsid_ActivationPropertiesOut = { 0x00000339, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };*/ diff --git a/epan/dissectors/packet-dcom-typeinfo.c b/epan/dissectors/packet-dcom-typeinfo.c index fd45777c67..4448ffd2c9 100644 --- a/epan/dissectors/packet-dcom-typeinfo.c +++ b/epan/dissectors/packet-dcom-typeinfo.c @@ -174,7 +174,7 @@ static int hf_typeinfo_wMinorVerNum; static gint ett_typeinfo_names; static e_guid_t uuid_typeinfo = {0x00020401, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}; -static guint16 ver_typeinfo = 0; +static guint16 ver_typeinfo; static gint ett_typeinfo; static int proto_typeinfo; diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index 3578334345..bd0c856116 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -69,7 +69,7 @@ void proto_reg_handoff_dcom (void); static int proto_dcom; -bool dcom_prefs_display_unmarshalling_details = false; +bool dcom_prefs_display_unmarshalling_details; static gint ett_dcom_this; @@ -215,9 +215,9 @@ static const e_guid_t iid_act_prop_in = { 0x000001A2, 0x0000, 0x0000, { 0xC0, static const e_guid_t iid_act_prop_out = { 0x000001A3, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; #endif -static GList *dcom_machines = NULL; -static GList *dcom_interfaces = NULL; -static GList *dcom_marshalers = NULL; +static GList *dcom_machines; +static GList *dcom_interfaces; +static GList *dcom_marshalers; static const value_string dcom_thisthat_flag_vals[] = { { 0, "INFO_NULL" }, diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c index 38a98905af..3f358af97c 100644 --- a/epan/dissectors/packet-dec-dnart.c +++ b/epan/dissectors/packet-dec-dnart.c @@ -164,8 +164,8 @@ static gint ett_dec_sess_contents; static expert_field ei_dec_rt_checksum; -static gint dec_dna_total_bytes_this_segment = 0; -static gint dec_dna_previous_total = 0; +static gint dec_dna_total_bytes_this_segment; +static gint dec_dna_previous_total; static const value_string rt_msg_type_vals[] = { { 0x0 , "Initialization message" }, diff --git a/epan/dissectors/packet-devicenet.c b/epan/dissectors/packet-devicenet.c index 888d108654..b8bed7c3e5 100644 --- a/epan/dissectors/packet-devicenet.c +++ b/epan/dissectors/packet-devicenet.c @@ -121,9 +121,9 @@ typedef struct { } uat_devicenet_record_t; -static uat_devicenet_record_t *uat_devicenet_records = NULL; -static uat_t *devicenet_uat = NULL; -static guint num_devicenet_records_uat = 0; +static uat_devicenet_record_t *uat_devicenet_records; +static uat_t *devicenet_uat; +static guint num_devicenet_records_uat; static bool uat_devicenet_record_update_cb(void* r, char** err) { uat_devicenet_record_t* rec = (uat_devicenet_record_t *)r; diff --git a/epan/dissectors/packet-dhcp.c b/epan/dissectors/packet-dhcp.c index 274fde2792..e7c39bee30 100644 --- a/epan/dissectors/packet-dhcp.c +++ b/epan/dissectors/packet-dhcp.c @@ -1015,7 +1015,7 @@ static const value_string o43pxeclient_boot_menu_types[] = { { 0, NULL }, }; -static bool novell_string = false; +static bool novell_string; static gint dhcp_uuid_endian = ENC_LITTLE_ENDIAN; @@ -1715,10 +1715,10 @@ typedef struct { } uat_dhcp_record_t; -static uat_dhcp_record_t *uat_dhcp_records = NULL; -static uat_t *dhcp_uat = NULL; -static guint num_dhcp_records_uat = 0; -static wmem_list_t *saved_uat_opts = NULL; /* List of previous options from UAT to "free" from dissection */ +static uat_dhcp_record_t *uat_dhcp_records; +static uat_t *dhcp_uat; +static guint num_dhcp_records_uat; +static wmem_list_t *saved_uat_opts; /* List of previous options from UAT to "free" from dissection */ static void* uat_dhcp_record_copy_cb(void* n, const void* o, size_t siz _U_) { uat_dhcp_record_t* new_record = (uat_dhcp_record_t *)n; diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index c3e3b5d45e..437dfac96c 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -61,7 +61,7 @@ void proto_register_dhcpv6(void); void proto_reg_handoff_dhcpv6(void); static bool dhcpv6_bulk_leasequery_desegment = true; -static bool cablelabs_interface_id = false; +static bool cablelabs_interface_id; static int proto_dhcpv6; static int proto_dhcpv6_bulk_leasequery; diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 9125507e94..b39cb1f433 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -380,7 +380,7 @@ compare_avps(const void *a, const void *b) return 0; } -static GHashTable* diameterstat_cmd_str_hash = NULL; +static GHashTable* diameterstat_cmd_str_hash; #define DIAMETER_NUM_PROCEDURES 1 static void diff --git a/epan/dissectors/packet-discard.c b/epan/dissectors/packet-discard.c index cb9aba99f9..7b2117f0f8 100644 --- a/epan/dissectors/packet-discard.c +++ b/epan/dissectors/packet-discard.c @@ -33,8 +33,8 @@ static int hf_discard_text; static int hf_discard_md5_hash; static int hf_discard_len; -static bool show_as_text = false; -static bool generate_md5_hash = false; +static bool show_as_text; +static bool generate_md5_hash; static gint ett_discard; diff --git a/epan/dissectors/packet-disp.c b/epan/dissectors/packet-disp.c index 031cc7a7fa..7a7e604be3 100644 --- a/epan/dissectors/packet-disp.c +++ b/epan/dissectors/packet-disp.c @@ -221,7 +221,7 @@ static expert_field ei_disp_unsupported_errcode; static expert_field ei_disp_unsupported_pdu; static expert_field ei_disp_zero_pdu; -static dissector_handle_t disp_handle = NULL; +static dissector_handle_t disp_handle; /*--- Cyclic dependencies ---*/ diff --git a/epan/dissectors/packet-dlt.c b/epan/dissectors/packet-dlt.c index dda06edb61..33785ea5ae 100644 --- a/epan/dissectors/packet-dlt.c +++ b/epan/dissectors/packet-dlt.c @@ -164,9 +164,9 @@ void proto_reg_handoff_dlt_storage_header(void); static int proto_dlt; static int proto_dlt_storage_header; -static dissector_handle_t dlt_handle_udp = NULL; -static dissector_handle_t dlt_handle_tcp = NULL; -static dissector_handle_t dlt_handle_storage = NULL; +static dissector_handle_t dlt_handle_udp; +static dissector_handle_t dlt_handle_tcp; +static dissector_handle_t dlt_handle_storage; /* Subdissectors */ static heur_dissector_list_t heur_subdissector_list; diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index 55e921d313..37295a5606 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -492,8 +492,8 @@ typedef struct _dmp_id_val { guint32 ack_resend_count; /* Acknowledgement resend counter */ } dmp_id_val; -static wmem_map_t *dmp_id_hash_table = NULL; -static wmem_map_t *dmp_long_id_hash_table = NULL; +static wmem_map_t *dmp_id_hash_table; +static wmem_map_t *dmp_long_id_hash_table; /* Global values used in several functions */ static struct dmp_data { @@ -523,9 +523,9 @@ static struct dmp_data { /* User definable values */ static gint dmp_nat_decode = NAT_DECODE_DMP; -static gint dmp_local_nation = 0; +static gint dmp_local_nation; static bool use_seq_ack_analysis = true; -static bool dmp_align = false; +static bool dmp_align; typedef struct _dmp_security_class_t { guint nation; diff --git a/epan/dissectors/packet-dmx.c b/epan/dissectors/packet-dmx.c index 35f13256c2..c4414c738e 100644 --- a/epan/dissectors/packet-dmx.c +++ b/epan/dissectors/packet-dmx.c @@ -105,9 +105,9 @@ static dissector_handle_t dmx_text_handle; /* * Here are the global variables associated with the preferences for DMX */ -static gint global_disp_chan_val_type = 0; +static gint global_disp_chan_val_type; static gint global_disp_col_count = 16; -static gint global_disp_chan_nr_type = 0; +static gint global_disp_chan_nr_type; static int dissect_dmx_chan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 2a859c20df..051d986a22 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -82,12 +82,12 @@ static bool dns_qr_statistics_enabled = true; // knob to turn on-off the display of query record name (at runtime) // qrn = Query-Record-Name -static bool dns_qr_qrn_statistics_enabled = false; +static bool dns_qr_qrn_statistics_enabled; // knob to turn on-off the display of query-record-name for answers, authorities // and additionals with zero values (at runtime) // aud = Answers-aUthorities-aDdtionals; zv = Zero-Value -static bool dns_qr_qrn_aud_zv_statistics_enabled = false; +static bool dns_qr_qrn_aud_zv_statistics_enabled; // support for above knobs static pref_t* perf_qr_enable_statistics; @@ -191,9 +191,9 @@ static gboolean dns_qr_rt_d_statistics_enabled = TRUE; // d = aDditional static guint dns_qr_r_ra_ttls[TTL_MAXIMUM_ELEMENTS]; // ra = Answer array static guint dns_qr_r_ru_ttls[TTL_MAXIMUM_ELEMENTS]; // ru = aUthority array static guint dns_qr_r_rd_ttls[TTL_MAXIMUM_ELEMENTS]; // rd = aDditional array -static guint dns_qr_r_ra_ttl_index = 0; // ra = Answer index -static guint dns_qr_r_ru_ttl_index = 0; // ru = aUthority index -static guint dns_qr_r_rd_ttl_index = 0; // rd = aDditional index +static guint dns_qr_r_ra_ttl_index; // ra = Answer index +static guint dns_qr_r_ru_ttl_index; // ru = aUthority index +static guint dns_qr_r_rd_ttl_index; // rd = aDditional index // pointers that point and index into context arrays, i.e., points to answer // array when processing an answer, points to authority array when processing an @@ -664,7 +664,7 @@ static expert_field ei_dns_retransmit_response; static expert_field ei_dns_extraneous_data; static expert_field ei_dns_response_missing; -static dissector_table_t dns_tsig_dissector_table=NULL; +static dissector_table_t dns_tsig_dissector_table; static dissector_handle_t dns_handle; static dissector_handle_t mdns_udp_handle; @@ -675,7 +675,7 @@ static dissector_handle_t doq_handle; /* desegmentation of DNS over TCP */ static bool dns_desegment = true; -static bool dns_qname_stats = false; +static bool dns_qname_stats; /* Maximum number of elapsed seconds between messages with the same * transaction ID to be considered as a retransmission diff --git a/epan/dissectors/packet-do-irp.c b/epan/dissectors/packet-do-irp.c index 22b8caed21..1078d6d99a 100644 --- a/epan/dissectors/packet-do-irp.c +++ b/epan/dissectors/packet-do-irp.c @@ -265,7 +265,7 @@ struct do_irp_request_hash_val { guint32 pnum_resp; guint32 opcode; }; -static wmem_map_t *do_irp_request_hash_map = NULL; +static wmem_map_t *do_irp_request_hash_map; #define DO_IRP_OC_RESERVED 0 #define DO_IRP_OC_RESOLUTION 1 diff --git a/epan/dissectors/packet-docsis.c b/epan/dissectors/packet-docsis.c index 678b406de4..343caf1ad9 100644 --- a/epan/dissectors/packet-docsis.c +++ b/epan/dissectors/packet-docsis.c @@ -53,7 +53,7 @@ void proto_reg_handoff_docsis(void); /* Assume all packets have an FCS */ static bool docsis_check_fcs = true; -static bool docsis_dissect_encrypted_frames = false; +static bool docsis_dissect_encrypted_frames; #define DOCSIS_MIN_HEADER_LEN 6 diff --git a/epan/dissectors/packet-dof.c b/epan/dissectors/packet-dof.c index d4461a11f5..acd462f3d1 100644 --- a/epan/dissectors/packet-dof.c +++ b/epan/dissectors/packet-dof.c @@ -1215,7 +1215,7 @@ static int * const bitmask_oap_1_cmdcontrol_flags[] = { static expert_field ei_oap_no_session; -static GHashTable *oap_1_alias_to_binding = NULL; +static GHashTable *oap_1_alias_to_binding; #define OAP_1_RESPONSE (0x80) #define OAP_1_CMD_ACTIVATE 28 @@ -2103,9 +2103,9 @@ static expert_field ei_security_13_out_of_range; * partial information is known, and must support looking up in both directions * based on what is known from a particular PDU. */ -static GHashTable *node_key_to_sid_id = NULL; -static GHashTable *sid_buffer_to_sid_id = NULL; -static GHashTable *sid_id_to_sid_buffer = NULL; +static GHashTable *node_key_to_sid_id; +static GHashTable *sid_buffer_to_sid_id; +static GHashTable *sid_id_to_sid_buffer; typedef struct _node_key_to_sid_id_key { @@ -2222,7 +2222,7 @@ static void dpp_reset_sid_support(void) * The hash is used to look up common operation information each time an operation * is seen in any packet. */ -static GHashTable *dpp_opid_to_packet_data = NULL; +static GHashTable *dpp_opid_to_packet_data; static guint dpp_opid_hash_fn(gconstpointer opid) { @@ -2257,7 +2257,7 @@ static void dpp_reset_opid_support(void) /** * NON-SECURE SESSION LOOKUP SUPPORT */ -static GHashTable *dof_ns_session_lookup = NULL; +static GHashTable *dof_ns_session_lookup; /** * NON-SECURE DPS SESSION @@ -3223,8 +3223,8 @@ static int dof_dissect_dnp_length(tvbuff_t *tvb, packet_info *pinfo, guint8 vers * mode templates, security keys, and secrets to be configured. */ -static bool decrypt_all_packets = false; -static bool track_operations = false; +static bool decrypt_all_packets; +static bool track_operations; static guint track_operations_window = 5; static guint32 next_dof_frame = 1; @@ -3235,8 +3235,8 @@ typedef struct _secmode_field_t { gchar *kek; } secmode_field_t; -static secmode_field_t *secmode_list = NULL; -static guint num_secmode_list = 0; +static secmode_field_t *secmode_list; +static guint num_secmode_list; /* Structure for security keys. */ typedef struct _seckey_field_t { @@ -3331,12 +3331,12 @@ static dof_security_data global_security; static guint8 count_hex_bytes(gchar *str); /* Global DPS data structures for security keys. */ -static seckey_field_t *seckey_list = NULL; -static guint num_seckey_list = 0; +static seckey_field_t *seckey_list; +static guint num_seckey_list; /* Global DPS data structures for identity secrets. */ -static identsecret_field_t *identsecret_list = NULL; -static guint num_identsecret_list = 0; +static identsecret_field_t *identsecret_list; +static guint num_identsecret_list; /* Callbacks for Configuration security templates. */ @@ -3528,7 +3528,7 @@ static void init_addr_port_tables(void); * transport address. This requires a hash lookup from address/port to ID. */ -static GHashTable *addr_port_to_id = NULL; +static GHashTable *addr_port_to_id; typedef struct _addr_port_key { diff --git a/epan/dissectors/packet-doip.c b/epan/dissectors/packet-doip.c index 00ffcedf2c..4a050ea250 100644 --- a/epan/dissectors/packet-doip.c +++ b/epan/dissectors/packet-doip.c @@ -530,9 +530,9 @@ ht_lookup_name(GHashTable* ht, unsigned int identifier) { */ #define DATAFILE_DOIP_DIAG_ADDRESSES "DoIP_diagnostic_addresses" -static GHashTable *data_doip_diag_addresses = NULL; -static generic_one_id_string_t* doip_diag_addresses = NULL; -static guint doip_diag_address_count = 0; +static GHashTable *data_doip_diag_addresses; +static generic_one_id_string_t* doip_diag_addresses; +static guint doip_diag_address_count; UAT_HEX_CB_DEF(doip_diag_addresses, id, generic_one_id_string_t) UAT_CSTRING_CB_DEF(doip_diag_addresses, name, generic_one_id_string_t) @@ -580,9 +580,9 @@ doip_prototree_add_with_resolv(proto_tree* doip_tree, int hfindex, int hfindex_n */ #define DATAFILE_DOIP_PAYLOAD_TYPES "DoIP_payload_types" -static GHashTable *data_doip_payload_types = NULL; -static generic_one_id_string_t* doip_payload_types = NULL; -static guint doip_payload_type_count = 0; +static GHashTable *data_doip_payload_types; +static generic_one_id_string_t* doip_payload_types; +static guint doip_payload_type_count; UAT_HEX_CB_DEF(doip_payload_types, id, generic_one_id_string_t) UAT_CSTRING_CB_DEF(doip_payload_types, name, generic_one_id_string_t) diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c index 088c88e104..cfaac1229e 100644 --- a/epan/dissectors/packet-dop.c +++ b/epan/dissectors/packet-dop.c @@ -46,7 +46,7 @@ void proto_reg_handoff_dop(void); /* Initialize the protocol and registered fields */ static int proto_dop; -static const char *binding_type = NULL; /* binding_type */ +static const char *binding_type; /* binding_type */ static int call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char *col_info, void* data); @@ -320,7 +320,7 @@ static expert_field ei_dop_unsupported_errcode; static expert_field ei_dop_unsupported_pdu; static expert_field ei_dop_zero_pdu; -static dissector_handle_t dop_handle = NULL; +static dissector_handle_t dop_handle; /* Dissector table */ static dissector_table_t dop_dissector_table; diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index be9aae237e..3ccd304dad 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -61,8 +61,8 @@ void proto_register_dtls(void); #ifdef HAVE_LIBGNUTLS /* DTLS User Access Table */ -static ssldecrypt_assoc_t *dtlskeylist_uats = NULL; -static guint ndtlsdecrypt = 0; +static ssldecrypt_assoc_t *dtlskeylist_uats; +static guint ndtlsdecrypt; #endif /* we need to remember the top tree so that subdissectors we call are created @@ -186,20 +186,20 @@ static expert_field ei_dtls_cid_invalid_enc_content; #endif #ifdef HAVE_LIBGNUTLS -static GHashTable *dtls_key_hash = NULL; -static wmem_stack_t *key_list_stack = NULL; -static uat_t *dtlsdecrypt_uat = NULL; -static const gchar *dtls_keys_list = NULL; +static GHashTable *dtls_key_hash; +static wmem_stack_t *key_list_stack; +static uat_t *dtlsdecrypt_uat; +static const gchar *dtls_keys_list; #endif static reassembly_table dtls_reassembly_table; -static dissector_table_t dtls_associations = NULL; -static dissector_handle_t dtls_handle = NULL; -static StringInfo dtls_compressed_data = {NULL, 0}; -static StringInfo dtls_decrypted_data = {NULL, 0}; -static gint dtls_decrypted_data_avail = 0; - -static ssl_common_options_t dtls_options = { NULL, NULL}; -static const gchar *dtls_debug_file_name = NULL; +static dissector_table_t dtls_associations; +static dissector_handle_t dtls_handle; +static StringInfo dtls_compressed_data; +static StringInfo dtls_decrypted_data; +static gint dtls_decrypted_data_avail; + +static ssl_common_options_t dtls_options; +static const gchar *dtls_debug_file_name; static guint32 dtls_default_client_cid_length; static guint32 dtls_default_server_cid_length; diff --git a/epan/dissectors/packet-dvb-s2-bb.c b/epan/dissectors/packet-dvb-s2-bb.c index 9fe50ae0dd..9b7d1351cb 100644 --- a/epan/dissectors/packet-dvb-s2-bb.c +++ b/epan/dissectors/packet-dvb-s2-bb.c @@ -124,8 +124,8 @@ static const enum_val_t dvb_s2_modeadapt_enum[] = { {NULL, NULL, -1} }; -static bool dvb_s2_full_dissection = false; -static bool dvb_s2_df_dissection = false; +static bool dvb_s2_full_dissection; +static bool dvb_s2_df_dissection; static gint dvb_s2_default_modeadapt = DVB_S2_MODEADAPT_TYPE_L3; static bool dvb_s2_try_all_modeadapt = true; @@ -990,7 +990,7 @@ typedef struct { guint32 isi; } virtual_stream_key; -static wmem_map_t *virtual_stream_hashtable = NULL; +static wmem_map_t *virtual_stream_hashtable; static guint virtual_stream_count = 1; /* Hash functions */ diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index ba8e70eeeb..c3fa0020ac 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -427,7 +427,7 @@ void proto_reg_handoff_dvbci(void); /* "don't care" value for min_len_field and len_field (this can't be 0) */ #define LEN_FIELD_ANY G_MAXUINT32 -static GHashTable *apdu_table = NULL; +static GHashTable *apdu_table; typedef struct _apdu_info_t { guint32 tag; @@ -839,13 +839,13 @@ static int proto_dvbci; static dissector_handle_t dvbci_handle; -static const gchar *dvbci_sek = NULL; -static const gchar *dvbci_siv = NULL; -static bool dvbci_dissect_lsc_msg = false; +static const gchar *dvbci_sek; +static const gchar *dvbci_siv; +static bool dvbci_dissect_lsc_msg; /* the output of pref_key_string_to_bin() applied to dvbci_sek and _siv */ -static unsigned char *dvbci_sek_bin = NULL; -static unsigned char *dvbci_siv_bin = NULL; +static unsigned char *dvbci_sek_bin; +static unsigned char *dvbci_siv_bin; static dissector_handle_t data_handle; static dissector_handle_t mpeg_pmt_handle; @@ -1327,7 +1327,7 @@ static const value_string dvbci_spdu_tag[] = { { T_CLOSE_SESSION_RESPONSE, "Close Session Response" }, { 0, NULL } }; -static GHashTable *spdu_table = NULL; +static GHashTable *spdu_table; static const spdu_info_t spdu_info[] = { { T_SESSION_NUMBER, DIRECTION_ANY, 2 }, { T_OPEN_SESSION_REQUEST, DATA_CAM_TO_HOST, 4 }, diff --git a/epan/dissectors/packet-dvmrp.c b/epan/dissectors/packet-dvmrp.c index 83f37c4924..372ab25e69 100644 --- a/epan/dissectors/packet-dvmrp.c +++ b/epan/dissectors/packet-dvmrp.c @@ -102,7 +102,7 @@ static int ett_route; static expert_field ei_checksum; -static bool strict_v3 = false; +static bool strict_v3; #define DVMRP_TYPE 0x13 static const value_string dvmrp_type[] = { diff --git a/epan/dissectors/packet-e2ap.c b/epan/dissectors/packet-e2ap.c index c62511e494..8e72e28fe0 100644 --- a/epan/dissectors/packet-e2ap.c +++ b/epan/dissectors/packet-e2ap.c @@ -1705,7 +1705,7 @@ static const value_string mtype_names[] = { { 0, NULL } }; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static void set_message_label(asn1_ctx_t *actx, int type) { diff --git a/epan/dissectors/packet-ecmp.c b/epan/dissectors/packet-ecmp.c index ec58fd52b8..6137c340b3 100644 --- a/epan/dissectors/packet-ecmp.c +++ b/epan/dissectors/packet-ecmp.c @@ -38,7 +38,7 @@ static int proto_ecmp; static int proto_modbus; /* These are the handles of our subdissectors */ -static dissector_handle_t modbus_handle = NULL; +static dissector_handle_t modbus_handle; /*smallest size of a packet, number of bytes*/ static const gint ecmp_min_packet_size = 6; @@ -70,7 +70,7 @@ static const gint ecmp_min_packet_size = 6; #define ECMP_COMMAND_MODBUSPDU 0x74 /* cyclic display formats */ -static const guint8 cyclic_display_byte_format = 0; +static const guint8 cyclic_display_byte_format; static const guint8 cyclic_display_word_format = 1; static const guint8 cyclic_display_long_format = 2; diff --git a/epan/dissectors/packet-eigrp.c b/epan/dissectors/packet-eigrp.c index 9fe3896b39..ad1390b8cd 100644 --- a/epan/dissectors/packet-eigrp.c +++ b/epan/dissectors/packet-eigrp.c @@ -537,8 +537,8 @@ static expert_field ei_eigrp_prefixlen; static expert_field ei_eigrp_tlv_trunc; /* some extra handle that might be needed */ -static dissector_handle_t ipxsap_handle = NULL; -static dissector_table_t media_type_table = NULL; +static dissector_handle_t ipxsap_handle; +static dissector_table_t media_type_table; static const value_string eigrp_opcode2string[] = { { EIGRP_OPC_UPDATE, "Update" }, diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index 16e8bc25d7..869756783b 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -457,7 +457,7 @@ static dissector_handle_t dlr_handle; static bool enip_desegment = true; static bool enip_OTrun_idle = true; -static bool enip_TOrun_idle = false; +static bool enip_TOrun_idle; static int proto_dlr; @@ -810,7 +810,7 @@ static void enip_prompt(packet_info *pinfo _U_, gchar* result) snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Dissect unidentified I/O traffic as"); } -static wmem_map_t *enip_request_hashtable = NULL; +static wmem_map_t *enip_request_hashtable; /* Return codes of function classifying packets as query/response */ enum enip_packet_type {ENIP_REQUEST_PACKET, ENIP_RESPONSE_PACKET, ENIP_CANNOT_CLASSIFY}; @@ -1109,7 +1109,7 @@ static gchar* cip_connection_conv_filter(packet_info *pinfo, void *user_data) */ // Key: (triad, connection IDs), Value: cip_conn_info_t -static wmem_map_t *enip_conn_hashtable = NULL; +static wmem_map_t *enip_conn_hashtable; static guint32 enip_unique_connid; static gboolean diff --git a/epan/dissectors/packet-enrp.c b/epan/dissectors/packet-enrp.c index 3f8ab5b6b1..d534157fb1 100644 --- a/epan/dissectors/packet-enrp.c +++ b/epan/dissectors/packet-enrp.c @@ -98,8 +98,8 @@ static gint ett_enrp_parameter; static gint ett_enrp_cause; static gint ett_enrp_flags; -static guint64 enrp_total_msgs = 0; -static guint64 enrp_total_bytes = 0; +static guint64 enrp_total_msgs; +static guint64 enrp_total_bytes; static expert_field ei_enrp_max_recursion_depth_reached; static expert_field ei_enrp_invalid_length; diff --git a/epan/dissectors/packet-enttec.c b/epan/dissectors/packet-enttec.c index 411536d79a..b4cfb598b5 100644 --- a/epan/dissectors/packet-enttec.c +++ b/epan/dissectors/packet-enttec.c @@ -97,9 +97,9 @@ static int ett_enttec; * for enttec */ -static gint global_disp_chan_val_type = 0; +static gint global_disp_chan_val_type; static gint global_disp_col_count = 16; -static gint global_disp_chan_nr_type = 0; +static gint global_disp_chan_nr_type; static gint dissect_enttec_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index 56e296a542..203ef4c3ca 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -470,8 +470,8 @@ typedef struct { guint32 frame; } duplication_data; -static guint32 ct = 0; -static guint32 count = 0; +static guint32 ct; +static guint32 count; typedef struct _epl_sdo_reassembly { @@ -596,9 +596,9 @@ struct device_profile_uat_assoc { guint product_code; }; -static uat_t *device_profile_uat = NULL; -static struct device_profile_uat_assoc *device_profile_list_uats = NULL; -static guint ndevice_profile_uat = 0; +static uat_t *device_profile_uat; +static struct device_profile_uat_assoc *device_profile_list_uats; +static guint ndevice_profile_uat; static void *device_profile_uat_copy_cb(void *, const void *, size_t); static void device_profile_uat_free_cb(void *); @@ -634,9 +634,9 @@ struct nodeid_profile_uat_assoc { char *id_str; }; -static uat_t *nodeid_profile_uat = NULL; -static struct nodeid_profile_uat_assoc *nodeid_profile_list_uats = NULL; -static guint nnodeid_profile_uat = 0; +static uat_t *nodeid_profile_uat; +static struct nodeid_profile_uat_assoc *nodeid_profile_list_uats; +static guint nnodeid_profile_uat; static void nodeid_profile_list_uats_nodeid_set_cb(void *, const char *, unsigned, const void*, const void*); @@ -1821,8 +1821,8 @@ static expert_field ei_real_length_differs; static dissector_handle_t epl_handle; static dissector_handle_t epl_udp_handle; -static bool show_cmd_layer_for_duplicated = false; -static bool show_pdo_meta_info = false; +static bool show_cmd_layer_for_duplicated; +static bool show_pdo_meta_info; static bool use_xdc_mappings = true; static bool interpret_untyped_as_le = true; static bool use_sdo_mappings = true; @@ -1830,7 +1830,7 @@ static bool use_sdo_mappings = true; static gint ett_epl_asnd_sdo_data_reassembled; static reassembly_table epl_reassembly_table; -static GHashTable *epl_duplication_table = NULL; +static GHashTable *epl_duplication_table; const struct epl_datatype *epl_type_to_hf(const char *name) @@ -1864,7 +1864,7 @@ epl_address_equal(gconstpointer a, gconstpointer b) * if we have dangling pointers. Courtesy of Peter Wu. */ -guint current_convo_generation = 0; /* FIXME remove */ +guint current_convo_generation; /* FIXME remove */ static wmem_allocator_t *pdo_mapping_scope; static struct object_mapping * get_object_mappings(wmem_array_t *arr, guint *len) @@ -1919,7 +1919,7 @@ add_object_mapping(wmem_array_t *arr, struct object_mapping *mapping) static wmem_map_t *epl_profiles_by_device, *epl_profiles_by_nodeid, *epl_profiles_by_address; static struct profile *epl_default_profile; -static const char *epl_default_profile_path = NULL, *epl_default_profile_path_last = NULL; +static const char *epl_default_profile_path = NULL, *epl_default_profile_path_last; static bool profile_del_cb(wmem_allocator_t *pool _U_, wmem_cb_event_t event _U_, void *_profile) @@ -2473,7 +2473,7 @@ cleanup_dissector(void) } /* preference whether or not display the SoC flags in info column */ -bool show_soc_flags = false; +bool show_soc_flags; /* Define the tap for epl */ /*static gint epl_tap = -1;*/ diff --git a/epan/dissectors/packet-epmd.c b/epan/dissectors/packet-epmd.c index b72c8b0b64..20215f085c 100644 --- a/epan/dissectors/packet-epmd.c +++ b/epan/dissectors/packet-epmd.c @@ -47,10 +47,10 @@ static int hf_epmd_creation; static gint ett_epmd; -static dissector_handle_t epmd_handle = NULL; +static dissector_handle_t epmd_handle; /* Other dissectors */ -static dissector_handle_t edp_handle = NULL; +static dissector_handle_t edp_handle; #define EPMD_PORT 4369 diff --git a/epan/dissectors/packet-erf.c b/epan/dissectors/packet-erf.c index 2e646d94f7..680c26a7b1 100644 --- a/epan/dissectors/packet-erf.c +++ b/epan/dissectors/packet-erf.c @@ -289,7 +289,7 @@ typedef enum { static gint erf_hdlc_type = ERF_HDLC_GUESS; static dissector_handle_t chdlc_handle, ppp_handle, frelay_handle, mtp2_handle; -static bool erf_rawcell_first = false; +static bool erf_rawcell_first; typedef enum { ERF_AAL5_GUESS = 0, diff --git a/epan/dissectors/packet-erldp.c b/epan/dissectors/packet-erldp.c index 863790bbdf..5c07cedc69 100644 --- a/epan/dissectors/packet-erldp.c +++ b/epan/dissectors/packet-erldp.c @@ -260,7 +260,7 @@ static gint ett_etf_fragments; static gboolean erldp_desegment = TRUE; /* Dissectors */ -static dissector_handle_t erldp_handle = NULL; +static dissector_handle_t erldp_handle; /* Defragmentation */ static const fragment_items etf_frag_items = { diff --git a/epan/dissectors/packet-etch.c b/epan/dissectors/packet-etch.c index 40fbfa3636..ae7497f87b 100644 --- a/epan/dissectors/packet-etch.c +++ b/epan/dissectors/packet-etch.c @@ -124,13 +124,13 @@ static dissector_handle_t etch_handle; */ static const char *gbl_keytab_folder = ""; -static char *gbl_current_keytab_folder = NULL; +static char *gbl_current_keytab_folder; static int gbl_pdu_counter; static guint32 gbl_old_frame_num; -static wmem_strbuf_t *gbl_symbol_buffer = NULL; -static gboolean gbl_have_symbol = FALSE; +static wmem_strbuf_t *gbl_symbol_buffer; +static gboolean gbl_have_symbol; /***************************************************************************/ /* Methods */ @@ -154,8 +154,8 @@ static int read_value(unsigned int *offset, tvbuff_t *tvb, proto_tree *etch_tree * value_string_ext from the array for use by try_val_to_str_ext & friends. * (Code based upon code in packet-diameter.c) */ -static GArray *gbl_symbols_array = NULL; -static value_string_ext *gbl_symbols_vs_ext = NULL; +static GArray *gbl_symbols_array; +static value_string_ext *gbl_symbols_vs_ext; static void gbl_symbols_new(void) diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index 8acab22777..65efdacf6e 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -47,19 +47,19 @@ void proto_reg_handoff_eth(void); #define PADDING_ANY 2 static gint eth_padding = PADDING_ZEROS; -static guint eth_trailer_length = 0; +static guint eth_trailer_length; /* By default, try to autodetect FCS */ static gint eth_fcs = -1; -static bool eth_check_fcs = false; +static bool eth_check_fcs; /* Interpret packets as FW1 monitor file packets if they look as if they are */ -static bool eth_interpret_as_fw1_monitor = false; +static bool eth_interpret_as_fw1_monitor; /* When capturing on a Cisco FEX some frames start with an extra destination mac */ -static bool eth_deduplicate_dmac = false; +static bool eth_deduplicate_dmac; /* Preference settings defining conditions for which the CCSDS dissector is called */ -static bool ccsds_heuristic_length = false; -static bool ccsds_heuristic_version = false; -static bool ccsds_heuristic_header = false; -static bool ccsds_heuristic_bit = false; +static bool ccsds_heuristic_length; +static bool ccsds_heuristic_version; +static bool ccsds_heuristic_header; +static bool ccsds_heuristic_bit; /* protocols and header fields */ static int proto_eth; diff --git a/epan/dissectors/packet-etw.c b/epan/dissectors/packet-etw.c index 342b6358b4..11fa08626d 100644 --- a/epan/dissectors/packet-etw.c +++ b/epan/dissectors/packet-etw.c @@ -63,7 +63,7 @@ static e_guid_t mbim_net_providerid = { 0xA42FE227, 0xA7BF, 0x4483, {0xA5, 0x02, ( ((Count)+(Pow2)-1) & (~(((int)(Pow2))-1)) ) #define ETW_HEADER_SIZE 0x60 -static int etw_counter = 0; +static int etw_counter; static int dissect_etw(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree _U_, void* data _U_) diff --git a/epan/dissectors/packet-evrc.c b/epan/dissectors/packet-evrc.c index ebab608f60..f79c96bc18 100644 --- a/epan/dissectors/packet-evrc.c +++ b/epan/dissectors/packet-evrc.c @@ -191,7 +191,7 @@ static expert_field ei_evrc_unknown_variant; * Variables to allow for proper deletion of dissector registration when * the user changes values */ -static bool legacy_pt_60 = false; +static bool legacy_pt_60; static guint8 diff --git a/epan/dissectors/packet-evs.c b/epan/dissectors/packet-evs.c index ca73efc668..cb61973fd6 100644 --- a/epan/dissectors/packet-evs.c +++ b/epan/dissectors/packet-evs.c @@ -26,7 +26,7 @@ void proto_reg_handoff_evs(void); static dissector_handle_t evs_handle; -static bool evs_hf_only = false; +static bool evs_hf_only; /* Initialize the protocol and registered fields */ static int proto_evs; diff --git a/epan/dissectors/packet-exec.c b/epan/dissectors/packet-exec.c index fe9ef318f4..3faf1bdb90 100644 --- a/epan/dissectors/packet-exec.c +++ b/epan/dissectors/packet-exec.c @@ -23,7 +23,7 @@ /* Variables for our preferences */ static bool preference_info_show_username = true; -static bool preference_info_show_command = false; +static bool preference_info_show_command; void proto_register_exec(void); void proto_reg_handoff_exec(void); diff --git a/epan/dissectors/packet-f1ap.c b/epan/dissectors/packet-f1ap.c index 74b9be81c4..1f121e9f24 100644 --- a/epan/dissectors/packet-f1ap.c +++ b/epan/dissectors/packet-f1ap.c @@ -4568,7 +4568,7 @@ static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, pro static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static void set_message_label(asn1_ctx_t *actx, int type) { diff --git a/epan/dissectors/packet-f5ethtrailer.c b/epan/dissectors/packet-f5ethtrailer.c index 16044a0b59..a052697c81 100644 --- a/epan/dissectors/packet-f5ethtrailer.c +++ b/epan/dissectors/packet-f5ethtrailer.c @@ -329,12 +329,12 @@ static gint hf_fi_session; /* Wireshark preference to show RST cause in info column */ static bool rstcause_in_info = true; /** Wireshark preference to look at all trailer bytes for f5ethtrailer */ -static bool pref_walk_trailer = false; +static bool pref_walk_trailer; /* Wireshark preference to enable/disable the population of other dissectors' * fields.*/ -static bool pref_pop_other_fields = false; +static bool pref_pop_other_fields; /** Wireshark preference to perform analysis */ -static bool pref_perform_analysis = false; +static bool pref_perform_analysis; /** Wireshark preference to generate keylog entries from f5ethtrailer TLS data */ static bool pref_generate_keylog = true; /** Identifiers for taps (when enabled), only the address is important, the @@ -907,12 +907,12 @@ static const char info_format_full_in_noslot[] = "IN tmm%-2u: "; static const char info_format_full_out_noslot[] = "OUT tmm%-2u: "; /* Variables used in f5eth_set_info_col functions initialized to defaults */ -static char *info_format_in_only = NULL; /**< In format in use with in/out only */ -static char *info_format_out_only = NULL; /**< Out format in use with in/out only */ -static char *info_format_in_noslot = NULL; /**< In format in use without slot */ -static char *info_format_out_noslot = NULL; /**< Out format in use without slot */ -static char *info_format_in_slot = NULL; /**< In format in use with slot */ -static char *info_format_out_slot = NULL; /**< Out format in use with slot */ +static char *info_format_in_only; /**< In format in use with in/out only */ +static char *info_format_out_only; /**< Out format in use with in/out only */ +static char *info_format_in_noslot; /**< In format in use without slot */ +static char *info_format_out_noslot; /**< Out format in use without slot */ +static char *info_format_in_slot; /**< In format in use with slot */ +static char *info_format_out_slot; /**< Out format in use with slot */ /** Info column display format preference types: * These correspond to bit flags @@ -941,13 +941,13 @@ static const enum_val_t f5eth_display_strings[] = { static f5eth_info_type_t pref_info_type = full; /** Preference for the brief in/out characters */ -static const char *pref_brief_inout_chars = NULL; +static const char *pref_brief_inout_chars; /** Function pointer prototype for info column set functions */ typedef void (*f5eth_set_col_info_func)(packet_info *, guint, guint, guint); /** Preference for setting platform regex for which platforms to display slot information for. */ -static const char *pref_slots_regex = NULL; +static const char *pref_slots_regex; /** Whether or not to display slot information, set based on platform and regex preference. */ static gboolean display_slot = TRUE; diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index 177b5962b0..54120732cd 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -153,7 +153,7 @@ typedef struct _fcseq_conv_data { guint32 seq_cnt; } fcseq_conv_data_t; -static wmem_map_t *fcseq_req_hash = NULL; +static wmem_map_t *fcseq_req_hash; /* * Hash Functions diff --git a/epan/dissectors/packet-fcdns.c b/epan/dissectors/packet-fcdns.c index 8cd0f07e11..0ab8e4cf22 100644 --- a/epan/dissectors/packet-fcdns.c +++ b/epan/dissectors/packet-fcdns.c @@ -314,7 +314,7 @@ typedef struct _fcdns_conv_data { guint32 opcode; } fcdns_conv_data_t; -static wmem_map_t *fcdns_req_hash = NULL; +static wmem_map_t *fcdns_req_hash; /* * Hash Functions diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c index 6f6120a9c3..da9d9d53b4 100644 --- a/epan/dissectors/packet-fcels.c +++ b/epan/dissectors/packet-fcels.c @@ -609,7 +609,7 @@ typedef struct _fcels_conv_data { guint32 opcode; } fcels_conv_data_t; -static wmem_map_t *fcels_req_hash = NULL; +static wmem_map_t *fcels_req_hash; static dissector_handle_t fcsp_handle; diff --git a/epan/dissectors/packet-fcfcs.c b/epan/dissectors/packet-fcfcs.c index 3f8457ca3f..402a510d63 100644 --- a/epan/dissectors/packet-fcfcs.c +++ b/epan/dissectors/packet-fcfcs.c @@ -87,7 +87,7 @@ typedef struct _fcfcs_conv_data { guint32 opcode; } fcfcs_conv_data_t; -static wmem_map_t *fcfcs_req_hash = NULL; +static wmem_map_t *fcfcs_req_hash; /* * Hash Functions diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c index 1f1cf3ffdf..7f9ca332dd 100644 --- a/epan/dissectors/packet-fcfzs.c +++ b/epan/dissectors/packet-fcfzs.c @@ -71,7 +71,7 @@ typedef struct _fcfzs_conv_data { guint32 opcode; } fcfzs_conv_data_t; -static wmem_map_t *fcfzs_req_hash = NULL; +static wmem_map_t *fcfzs_req_hash; /* * Hash Functions diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c index bfbe858756..93932fb988 100644 --- a/epan/dissectors/packet-fcswils.c +++ b/epan/dissectors/packet-fcswils.c @@ -434,7 +434,7 @@ typedef struct _fcswils_conv_data { guint32 opcode; } fcswils_conv_data_t; -static wmem_map_t *fcswils_req_hash = NULL; +static wmem_map_t *fcswils_req_hash; /* list of commands for each commandset */ typedef void (*fcswils_dissector_t)(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, guint8 isreq); diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c index b6fad94996..caa6bae849 100644 --- a/epan/dissectors/packet-fddi.c +++ b/epan/dissectors/packet-fddi.c @@ -48,7 +48,7 @@ static dissector_handle_t fddi_handle, fddi_bitswapped_handle; static capture_dissector_handle_t llc_cap_handle; -static bool fddi_padding = false; +static bool fddi_padding; #define FDDI_PADDING ((fddi_padding) ? 3 : 0) diff --git a/epan/dissectors/packet-flexray.c b/epan/dissectors/packet-flexray.c index 2b60df21c2..b2e905278a 100644 --- a/epan/dissectors/packet-flexray.c +++ b/epan/dissectors/packet-flexray.c @@ -26,7 +26,7 @@ void proto_register_flexray(void); static dissector_handle_t flexray_handle; -static bool prefvar_try_heuristic_first = false; +static bool prefvar_try_heuristic_first; static dissector_table_t subdissector_table; static dissector_table_t flexrayid_subdissector_table; @@ -110,9 +110,9 @@ typedef struct _sender_receiver_config { #define DATAFILE_FR_SENDER_RECEIVER "FR_senders_receivers" -static GHashTable *data_sender_receiver = NULL; -static sender_receiver_config_t *sender_receiver_configs = NULL; -static guint sender_receiver_config_num = 0; +static GHashTable *data_sender_receiver; +static sender_receiver_config_t *sender_receiver_configs; +static guint sender_receiver_config_num; UAT_HEX_CB_DEF(sender_receiver_configs, bus_id, sender_receiver_config_t) UAT_HEX_CB_DEF(sender_receiver_configs, channel, sender_receiver_config_t) diff --git a/epan/dissectors/packet-fmp.c b/epan/dissectors/packet-fmp.c index ee1120d28e..17d0289107 100644 --- a/epan/dissectors/packet-fmp.c +++ b/epan/dissectors/packet-fmp.c @@ -123,7 +123,7 @@ static const value_string fmp_encoding_mode_vals[] = { {0,NULL} }; -static bool fmp_fhandle_reqrep_matching = false; +static bool fmp_fhandle_reqrep_matching; static int dissect_fmp_genString(tvbuff_t *tvb, int offset, proto_tree *tree) diff --git a/epan/dissectors/packet-forces.c b/epan/dissectors/packet-forces.c index 191b3c6d7e..44cd6da0cb 100644 --- a/epan/dissectors/packet-forces.c +++ b/epan/dissectors/packet-forces.c @@ -135,9 +135,9 @@ static int hf_forces_unknown_tlv; #define TCP_UDP_TML_FOCES_MESSAGE_OFFSET_TCP 2 /*SCTP TML*/ -static guint forces_alternate_sctp_high_prio_channel_port = 0; -static guint forces_alternate_sctp_med_prio_channel_port = 0; -static guint forces_alternate_sctp_low_prio_channel_port = 0; +static guint forces_alternate_sctp_high_prio_channel_port; +static guint forces_alternate_sctp_med_prio_channel_port; +static guint forces_alternate_sctp_low_prio_channel_port; /*Initialize the subtree pointers*/ static gint ett_forces; diff --git a/epan/dissectors/packet-fractalgeneratorprotocol.c b/epan/dissectors/packet-fractalgeneratorprotocol.c index 68e3c8edc4..535ea0729a 100644 --- a/epan/dissectors/packet-fractalgeneratorprotocol.c +++ b/epan/dissectors/packet-fractalgeneratorprotocol.c @@ -49,8 +49,8 @@ static int hf_parameter_c2imag; static int hf_parameter_n; static int hf_buffer; -static guint64 fgp_total_msgs = 0; -static guint64 fgp_total_bytes = 0; +static guint64 fgp_total_msgs; +static guint64 fgp_total_bytes; /* Initialize the subtree pointers */ static gint ett_fractalgeneratorprotocol; diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 8723e5b19b..685c1204a9 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -214,11 +214,11 @@ static dissector_handle_t sysdig_handle; static dissector_handle_t systemd_journal_handle; /* Preferences */ -static bool show_file_off = false; -static bool force_docsis_encap = false; -static bool generate_md5_hash = false; +static bool show_file_off; +static bool force_docsis_encap; +static bool generate_md5_hash; static bool generate_bits_field = true; -static bool disable_packet_size_limited_in_summary = false; +static bool disable_packet_size_limited_in_summary; static guint max_comment_lines = 30; static const value_string p2p_dirs[] = { diff --git a/epan/dissectors/packet-ftdi-ft.c b/epan/dissectors/packet-ftdi-ft.c index 4aa5fd2895..eed804ec6c 100644 --- a/epan/dissectors/packet-ftdi-ft.c +++ b/epan/dissectors/packet-ftdi-ft.c @@ -132,9 +132,9 @@ static dissector_handle_t ftdi_ft_handle; static reassembly_table ftdi_reassembly_table; -static wmem_tree_t *request_info = NULL; -static wmem_tree_t *bitmode_info = NULL; -static wmem_tree_t *desegment_info = NULL; +static wmem_tree_t *request_info; +static wmem_tree_t *bitmode_info; +static wmem_tree_t *desegment_info; typedef struct _request_data { guint32 bus_id; diff --git a/epan/dissectors/packet-ftdi-mpsse.c b/epan/dissectors/packet-ftdi-mpsse.c index 49b89aefd0..0649bacb6d 100644 --- a/epan/dissectors/packet-ftdi-mpsse.c +++ b/epan/dissectors/packet-ftdi-mpsse.c @@ -119,8 +119,8 @@ static dissector_handle_t ftdi_mpsse_handle; * levels, tx_command_info tree is being used. It contains pointers to the same list as rx_command_info but * allows TX dissection to obtain the relevant command_data_t entry without traversing the list. */ -static wmem_tree_t *rx_command_info = NULL; -static wmem_tree_t *tx_command_info = NULL; +static wmem_tree_t *rx_command_info; +static wmem_tree_t *tx_command_info; typedef struct _command_data command_data_t; diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c index 6852469a54..355da7cd57 100644 --- a/epan/dissectors/packet-ftp.c +++ b/epan/dissectors/packet-ftp.c @@ -167,7 +167,7 @@ static const value_string eprt_af_vals[] = { It will be used to set the maximum file size for FTP's export objects (in megabytes). Use 0 for no limit. */ -static guint pref_export_maxsize = 0; +static guint pref_export_maxsize; typedef struct _ftp_eo_t { gchar *command; /* Command this data stream answers (e.g., RETR foo.txt) */ @@ -180,10 +180,10 @@ typedef struct _ftp_eo_t { table's row number, so we can append data from later FTP packets to the entries. */ -GHashTable *command_packet_to_eo_row = NULL; +GHashTable *command_packet_to_eo_row; /* Track which row number in the export object table we're up to */ -guint32 eo_row_count = 0; +guint32 eo_row_count; /** * This is the callback passed to register_export_object() @@ -363,7 +363,7 @@ static ftp_conversation_t *find_or_create_ftp_conversation(packet_info *pinfo) } /* Keep track of ftp_data_conversation_t*, keyed by the ftp command frame */ -static GHashTable *ftp_command_to_data_hash = NULL; +static GHashTable *ftp_command_to_data_hash; /* When new data conversation is being created, should: diff --git a/epan/dissectors/packet-fw1.c b/epan/dissectors/packet-fw1.c index b2f02df010..5e5020d428 100644 --- a/epan/dissectors/packet-fw1.c +++ b/epan/dissectors/packet-fw1.c @@ -87,8 +87,8 @@ void proto_reg_handoff_fw1(void); /* Place FW1 summary in proto tree */ static bool fw1_summary_in_tree = true; -static bool fw1_with_uuid = false; -static bool fw1_iflist_with_chain = false; +static bool fw1_with_uuid; +static bool fw1_iflist_with_chain; static dissector_handle_t ethertype_handle; diff --git a/epan/dissectors/packet-gdt.c b/epan/dissectors/packet-gdt.c index 0363f192ee..767ebd2eaa 100644 --- a/epan/dissectors/packet-gdt.c +++ b/epan/dissectors/packet-gdt.c @@ -34,7 +34,7 @@ /* Initialize the protocol and registered fields */ static int proto_gdt; -static dissector_handle_t gdt_handle = NULL; +static dissector_handle_t gdt_handle; static int hf_gdt_GDTMessage_PDU; /* GDTMessage */ static int hf_gdt_version; /* INTEGER */ diff --git a/epan/dissectors/packet-geonw.c b/epan/dissectors/packet-geonw.c index 77bd8cd369..f99b935977 100644 --- a/epan/dissectors/packet-geonw.c +++ b/epan/dissectors/packet-geonw.c @@ -152,7 +152,7 @@ void proto_register_geonw(void); /* * Variables */ -static wmem_map_t *geonw_hashtable = NULL; +static wmem_map_t *geonw_hashtable; static int proto_geonw; static int proto_btpa; diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index d59cf47b35..a92b51833e 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -925,7 +925,7 @@ LocateReplyHeader_t; * DATA - complete_request_list */ -static GList *giop_complete_request_list = NULL; +static GList *giop_complete_request_list; struct comp_req_list_entry { guint32 fn; /* frame number */ @@ -954,7 +954,7 @@ struct complete_reply_hash_val { guint32 mfn; /* matching frame number (request) */ }; -GHashTable *giop_complete_reply_hash = NULL; /* hash */ +GHashTable *giop_complete_reply_hash; /* hash */ /* * DATA - Module Hash stuff to store data from register_giop_user_module @@ -977,7 +977,7 @@ struct giop_module_val { giop_sub_handle_t *subh; /* handle to sub dissector */ }; -GHashTable *giop_module_hash = NULL; /* hash */ +GHashTable *giop_module_hash; /* hash */ /* @@ -986,7 +986,7 @@ GHashTable *giop_module_hash = NULL; /* hash */ * */ -static GSList *giop_sub_list = NULL; +static GSList *giop_sub_list; /* * DATA - Hash stuff to follow request/reply. This is so if we get a REPLY @@ -1076,7 +1076,7 @@ struct giop_object_val { ior_src_t src; /* where did Iget this IOR from */ }; -GHashTable *giop_objkey_hash = NULL; /* hash */ +GHashTable *giop_objkey_hash; /* hash */ /* * Data structure attached to a conversation. diff --git a/epan/dissectors/packet-glow.c b/epan/dissectors/packet-glow.c index 4f4294b342..e15db6f243 100644 --- a/epan/dissectors/packet-glow.c +++ b/epan/dissectors/packet-glow.c @@ -27,7 +27,7 @@ void proto_register_glow(void); -static dissector_handle_t glow_handle=NULL; +static dissector_handle_t glow_handle; static int proto_glow; static int hf_glow_Root_PDU; /* Root */ diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c index fcbaaf00e1..20f5b391b8 100644 --- a/epan/dissectors/packet-goose.c +++ b/epan/dissectors/packet-goose.c @@ -764,7 +764,7 @@ dissect_goose_GOOSEpdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, } -static dissector_handle_t goose_handle = NULL; +static dissector_handle_t goose_handle; #define OSI_SPDU_TUNNELED 0xA0 /* Tunneled */ diff --git a/epan/dissectors/packet-gopher.c b/epan/dissectors/packet-gopher.c index c53ecfe8f2..80b861f80b 100644 --- a/epan/dissectors/packet-gopher.c +++ b/epan/dissectors/packet-gopher.c @@ -65,7 +65,7 @@ static const value_string item_types[] = { #define TCP_DEFAULT_RANGE "70" -static range_t *gopher_tcp_range = NULL; +static range_t *gopher_tcp_range; /* Returns TRUE if the packet is from a client */ static gboolean diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index 03cba8ba27..f23a2ba7d5 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -116,7 +116,7 @@ static expert_field ei_llcgprs_no_info_field; static dissector_handle_t sndcp_xid_handle; static dissector_handle_t gprs_llc_handle; -static bool ignore_cipher_bit = false; +static bool ignore_cipher_bit; static dissector_table_t llcgprs_subdissector_table; diff --git a/epan/dissectors/packet-gprscdr.c b/epan/dissectors/packet-gprscdr.c index 8bc1bc1381..39a3459cf2 100644 --- a/epan/dissectors/packet-gprscdr.c +++ b/epan/dissectors/packet-gprscdr.c @@ -638,7 +638,7 @@ static expert_field ei_gprscdr_not_dissected; static expert_field ei_gprscdr_choice_not_found; /* Global variables */ -static const char *obj_id = NULL; +static const char *obj_id; static const value_string gprscdr_daylight_saving_time_vals[] = { {0, "No adjustment"}, diff --git a/epan/dissectors/packet-gquic.c b/epan/dissectors/packet-gquic.c index f7f95e1fd0..fa7a3f0e6f 100644 --- a/epan/dissectors/packet-gquic.c +++ b/epan/dissectors/packet-gquic.c @@ -189,7 +189,7 @@ static int hf_gquic_stream_data; static int hf_gquic_payload; #define QUIC_PORT_RANGE "80,443" -static bool g_gquic_debug = false; +static bool g_gquic_debug; static gint ett_gquic; static gint ett_gquic_puflags; diff --git a/epan/dissectors/packet-grpc.c b/epan/dissectors/packet-grpc.c index 8970daab57..2006b464be 100644 --- a/epan/dissectors/packet-grpc.c +++ b/epan/dissectors/packet-grpc.c @@ -80,13 +80,13 @@ #ifdef HAVE_ZLIB static gboolean grpc_decompress_body = TRUE; #else -static gboolean grpc_decompress_body = FALSE; +static gboolean grpc_decompress_body; #endif /* detect json automatically */ static bool grpc_detect_json_automatically = true; /* whether embed GRPC messages under HTTP2 (or other) protocol tree items */ -static bool grpc_embedded_under_http2 = false; +static bool grpc_embedded_under_http2; void proto_register_grpc(void); void proto_reg_handoff_grpc(void); diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c index 0493b1419a..9e9de2a8e5 100644 --- a/epan/dissectors/packet-gsm_a_bssmap.c +++ b/epan/dissectors/packet-gsm_a_bssmap.c @@ -796,7 +796,7 @@ static gint ett_dlci; static gint ett_codec_lst; static gint ett_bss_to_bss_info; -static dissector_handle_t gsm_bsslap_handle = NULL; +static dissector_handle_t gsm_bsslap_handle; static dissector_handle_t dtap_handle; static dissector_handle_t bssgp_handle; static dissector_handle_t rrc_handle; diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c index 490dc0eed1..ad0007f54c 100644 --- a/epan/dissectors/packet-gsm_a_common.c +++ b/epan/dissectors/packet-gsm_a_common.c @@ -770,7 +770,7 @@ static expert_field ei_gsm_a_format_not_supported; static expert_field ei_gsm_a_mobile_identity_type; static expert_field ei_gsm_a_ie_length_too_short; -sccp_assoc_info_t* sccp_assoc = NULL; +sccp_assoc_info_t* sccp_assoc; #define NUM_GSM_COMMON_ELEM (sizeof(gsm_common_elem_strings)/sizeof(value_string)) gint ett_gsm_common_elem[NUM_GSM_COMMON_ELEM]; diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c index b2a9aee805..0bd91a1a1a 100644 --- a/epan/dissectors/packet-gsm_a_rr.c +++ b/epan/dissectors/packet-gsm_a_rr.c @@ -54,7 +54,7 @@ void proto_reg_handoff_gsm_a_rr(void); static dissector_handle_t rrc_irat_ho_info_handle; static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle; -static guint gsm_a_rr_nri_length = 0; +static guint gsm_a_rr_nri_length; #define PADDING_BYTE 0x2B diff --git a/epan/dissectors/packet-gsm_abis_pgsl.c b/epan/dissectors/packet-gsm_abis_pgsl.c index 016d91d894..b752ac5d5e 100644 --- a/epan/dissectors/packet-gsm_abis_pgsl.c +++ b/epan/dissectors/packet-gsm_abis_pgsl.c @@ -80,7 +80,7 @@ static int hf_pgsl_ab_ab_type; static int ett_pgsl; static int ett_pacch; -static bool abis_pgsl_ir = false; +static bool abis_pgsl_ir; #define PGSL_MSG_DLDATA_REQ 1 #define PGSL_MSG_DLDATA_IND 2 diff --git a/epan/dissectors/packet-gsm_bsslap.c b/epan/dissectors/packet-gsm_bsslap.c index 6dfa07fb25..05d8c4ebca 100644 --- a/epan/dissectors/packet-gsm_bsslap.c +++ b/epan/dissectors/packet-gsm_bsslap.c @@ -21,7 +21,7 @@ void proto_reg_handoff_gsm_bsslap(void); void proto_register_gsm_bsslap(void); -static dissector_handle_t bsslap_rrlp_handle = NULL; +static dissector_handle_t bsslap_rrlp_handle; /* Initialize the protocol and registered fields */ static int proto_gsm_bsslap; diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c index 9c883adf86..27bf449afb 100644 --- a/epan/dissectors/packet-gsm_bssmap_le.c +++ b/epan/dissectors/packet-gsm_bssmap_le.c @@ -259,7 +259,7 @@ static expert_field ei_gsm_a_bssmap_le_not_decoded_yet; static expert_field ei_gsm_a_bssmap_le_extraneous_data; static expert_field ei_gsm_a_bssmap_le_missing_mandatory_element; -static dissector_handle_t gsm_bsslap_handle = NULL; +static dissector_handle_t gsm_bsslap_handle; static dissector_handle_t bssmap_le_handle; static proto_tree *g_tree; diff --git a/epan/dissectors/packet-gsm_ipa.c b/epan/dissectors/packet-gsm_ipa.c index 6f729315da..0092dc1748 100644 --- a/epan/dissectors/packet-gsm_ipa.c +++ b/epan/dissectors/packet-gsm_ipa.c @@ -63,8 +63,8 @@ void proto_reg_handoff_gsm_ipa(void); static dissector_handle_t ipa_tcp_handle; static dissector_handle_t ipa_udp_handle; -static bool global_ipa_in_root = false; -static bool global_ipa_in_info = false; +static bool global_ipa_in_root; +static bool global_ipa_in_info; /* Initialize the protocol and registered fields */ static int proto_ipa; diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index ae5e351dbc..8aaaa91234 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -2806,7 +2806,7 @@ static dissector_table_t map_prop_err_opcode_table; /* proprietary operat static range_t *global_ssn_range; #define APPLICATON_CONTEXT_FROM_TRACE 0 static gint pref_application_context_version = APPLICATON_CONTEXT_FROM_TRACE; -static bool pref_ericsson_proprietary_ext = false; +static bool pref_ericsson_proprietary_ext; /* Global variables */ static guint32 opcode=0; @@ -2815,8 +2815,8 @@ static int application_context_version; static guint ProtocolId; static guint AccessNetworkProtocolId; static int gsm_map_tap; -static guint8 gsmmap_pdu_type = 0; -static guint8 gsm_map_pdu_size = 0; +static guint8 gsmmap_pdu_type; +static guint8 gsm_map_pdu_size; #define SMS_ENCODING_NOT_SET 0 #define SMS_ENCODING_7BIT 1 diff --git a/epan/dissectors/packet-gsm_r_uus1.c b/epan/dissectors/packet-gsm_r_uus1.c index 10f7e4c64e..e78ee69e8c 100644 --- a/epan/dissectors/packet-gsm_r_uus1.c +++ b/epan/dissectors/packet-gsm_r_uus1.c @@ -111,7 +111,7 @@ static gint ett_gsm_r_uus1_alert_controller; /* Preferences */ -static bool q931_u2u = false; +static bool q931_u2u; static bool gsm_a_u2u = true; diff --git a/epan/dissectors/packet-gsm_rlcmac.c b/epan/dissectors/packet-gsm_rlcmac.c index 61e6855c0c..e497077b19 100644 --- a/epan/dissectors/packet-gsm_rlcmac.c +++ b/epan/dissectors/packet-gsm_rlcmac.c @@ -47,8 +47,8 @@ void proto_register_gsm_rlcmac(void); void proto_reg_handoff_gsm_rlcmac(void); -static dissector_handle_t lte_rrc_dl_dcch_handle = NULL; -static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL; +static dissector_handle_t lte_rrc_dl_dcch_handle; +static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle; /* private typedefs */ typedef struct diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c index ef505ce4a9..42d75c93ab 100644 --- a/epan/dissectors/packet-gsm_sms.c +++ b/epan/dissectors/packet-gsm_sms.c @@ -289,7 +289,7 @@ static value_string_ext gsm_sms_coding_group_bits_vals_ext = VALUE_STRING_EXT_IN static dissector_table_t gsm_sms_dissector_tbl; /* Short Message reassembly */ static reassembly_table g_sm_reassembly_table; -static wmem_multimap_t *g_sm_fragment_params_table = NULL; +static wmem_multimap_t *g_sm_fragment_params_table; static gint ett_gsm_sms_ud_fragment; static gint ett_gsm_sms_ud_fragments; /* diff --git a/epan/dissectors/packet-gsm_sms_ud.c b/epan/dissectors/packet-gsm_sms_ud.c index 048f0c9033..f0743f810f 100644 --- a/epan/dissectors/packet-gsm_sms_ud.c +++ b/epan/dissectors/packet-gsm_sms_ud.c @@ -105,14 +105,14 @@ static const fragment_items sm_frag_items = { }; /* Dissect all SM data as WSP if the UDH contains a Port Number IE */ -static bool port_number_udh_means_wsp = false; +static bool port_number_udh_means_wsp; /* Always try dissecting the 1st fragment of a SM, * even if it is not reassembled */ -static bool try_dissect_1st_frag = false; +static bool try_dissect_1st_frag; /* Prevent subdissectors changing column data */ -static bool prevent_subdissectors_changing_columns = false; +static bool prevent_subdissectors_changing_columns; static dissector_handle_t wsp_handle; diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index bb89bdddc2..ae8871c6ca 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -103,9 +103,9 @@ static dissector_handle_t nrup_handle; #define GTP_TPDU_AS_CUSTOM 5 static bool g_gtp_over_tcp = true; -bool g_gtp_session = false; +bool g_gtp_session; -static guint pref_pair_matching_max_interval_ms = 0; /* Default: disable */ +static guint pref_pair_matching_max_interval_ms; /* Default: disable */ static guint g_gtpv0_port = GTPv0_PORT; static guint g_gtpv1c_port = GTPv1C_PORT; @@ -692,7 +692,7 @@ typedef struct { } uat_pdcp_lte_keys_record_t; /* N.B. this is an array/table of the struct above, where IP address + TEID is the key */ -static uat_pdcp_lte_keys_record_t *uat_pdcp_lte_keys_records = NULL; +static uat_pdcp_lte_keys_record_t *uat_pdcp_lte_keys_records; static bool pdcp_lte_update_cb(void *r, char **err) { @@ -784,7 +784,7 @@ typedef struct { } uat_pdcp_nr_keys_record_t; /* N.B. this is an array/table of the struct above, where IP address + TEID is the key */ -static uat_pdcp_nr_keys_record_t *uat_pdcp_nr_keys_records = NULL; +static uat_pdcp_nr_keys_record_t *uat_pdcp_nr_keys_records; static bool pdcp_nr_update_cb(void *r, char **err) { uat_pdcp_nr_keys_record_t* rec = (uat_pdcp_nr_keys_record_t *)r; @@ -923,8 +923,8 @@ static const value_string vs_rohc_profile[] = { }; /* Entries added by UAT */ -static uat_t * pdcp_nr_keys_uat = NULL; -static guint num_pdcp_nr_keys_uat = 0; +static uat_t * pdcp_nr_keys_uat; +static guint num_pdcp_nr_keys_uat; /* Default values for a TEID entry */ UAT_CSTRING_CB_DEF(pdcp_nr_users, ip_addr_str, uat_pdcp_nr_keys_record_t) @@ -956,8 +956,8 @@ static uat_pdcp_nr_keys_record_t* look_up_pdcp_nr_keys_record(packet_info *pinfo } /* Entries added by UAT */ -static uat_t * pdcp_lte_keys_uat = NULL; -static guint num_pdcp_lte_keys_uat = 0; +static uat_t * pdcp_lte_keys_uat; +static guint num_pdcp_lte_keys_uat; /* Default values for a TEID entry */ UAT_CSTRING_CB_DEF(pdcp_lte_users, ip_addr_str, uat_pdcp_lte_keys_record_t) @@ -988,7 +988,7 @@ static uat_pdcp_lte_keys_record_t* look_up_pdcp_lte_keys_record(packet_info *pin /* --- END PDCP NR DECODE ADDITIONS --- */ -static bool g_gtp_etsi_order = false; +static bool g_gtp_etsi_order; static gint dissect_tpdu_as = GTP_TPDU_AS_TPDU_HEUR; static const enum_val_t gtp_decode_tpdu_as[] = { @@ -2453,7 +2453,7 @@ static const value_string gtp_ext_hdr_pdu_ses_cont_pdu_type_vals[] = { #define MM_PROTO_SESSION_MGMT 0x0A #define MM_PROTO_NON_CALL_RELATED 0x0B -static GHashTable *gtpstat_msg_idx_hash = NULL; +static GHashTable *gtpstat_msg_idx_hash; static void gtpstat_init(struct register_srt* srt _U_, GArray* srt_array) @@ -2986,7 +2986,7 @@ static const gtp_opt_t gtpopt[] = { #define NUM_GTP_IES 255 static gint ett_gtp_ies[NUM_GTP_IES]; -static guint8 gtp_version = 0; +static guint8 gtp_version; #define BCD2CHAR(d) ((d) | 0x30) @@ -4233,7 +4233,7 @@ typedef struct gtp_conv_info_t { wmem_map_t *matched; } gtp_conv_info_t; -static gtp_conv_info_t *gtp_info_items = NULL; +static gtp_conv_info_t *gtp_info_items; static guint gtp_sn_hash(gconstpointer k) diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index a828bd04db..574b5eecab 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -1320,7 +1320,7 @@ static gint ett_gtpv2_ies[NUM_GTPV2_IES]; #define PREF_DECODE_SRVCC_P2C_TRANS_CONT_TARGET_UTRAN 1 static gint pref_decode_srvcc_p2c_trans_cont = PREF_DECODE_SRVCC_P2C_TRANS_CONT_NO; -static guint pref_pair_matching_max_interval_ms = 0; /* Default: disable */ +static guint pref_pair_matching_max_interval_ms; /* Default: disable */ /* Table 8.1-1: Information Element types for GTPv2 */ static const value_string gtpv2_element_type_vals[] = { @@ -1579,7 +1579,7 @@ gtpv2_sn_equal_unmatched(gconstpointer k1, gconstpointer k2) return key1->seq_nr == key2->seq_nr; } -static GHashTable *gtpv2_stat_msg_idx_hash = NULL; +static GHashTable *gtpv2_stat_msg_idx_hash; static void gtpv2_stat_init(struct register_srt* srt _U_, GArray*srt_array) diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c index 972a2c5c87..619840566e 100644 --- a/epan/dissectors/packet-h223.c +++ b/epan/dissectors/packet-h223.c @@ -166,7 +166,7 @@ typedef struct { guint32 vc; /* child circuit */ } circuit_chain_key; -static wmem_map_t *circuit_chain_hashtable = NULL; +static wmem_map_t *circuit_chain_hashtable; static guint circuit_chain_count = 1; /* Hash Functions */ diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index a912fe3c61..873e6f9529 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -79,7 +79,7 @@ typedef struct _h225ras_call_info_key { /* Global Memory Chunks for lists and Global hash tables*/ -static wmem_map_t *ras_calls[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; +static wmem_map_t *ras_calls[7]; /* functions, needed using ras-request and halfcall matching*/ static h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category); @@ -97,9 +97,9 @@ static dissector_table_t gef_name_dissector_table; static dissector_table_t gef_content_dissector_table; -static dissector_handle_t h245_handle=NULL; -static dissector_handle_t h245dg_handle=NULL; -static dissector_handle_t h4501_handle=NULL; +static dissector_handle_t h245_handle; +static dissector_handle_t h245dg_handle; +static dissector_handle_t h4501_handle; static dissector_handle_t nsp_handle; static dissector_handle_t tp_handle; @@ -1145,7 +1145,7 @@ static guint32 ipv4_address; static ws_in6_addr ipv6_address; static ws_in6_addr ipv6_address_zeros = {{0}}; static guint32 ip_port; -static gboolean contains_faststart = FALSE; +static gboolean contains_faststart; static e_guid_t *call_id_guid; /* NonStandardParameter */ diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index 84a5a050aa..3c44758fb4 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -51,7 +51,7 @@ void proto_register_h245(void); void proto_reg_handoff_h245(void); -static dissector_handle_t rtcp_handle=NULL; +static dissector_handle_t rtcp_handle; static dissector_table_t nsp_object_dissector_table; static dissector_table_t nsp_h221_dissector_table; static dissector_table_t gef_name_dissector_table; @@ -60,8 +60,8 @@ static dissector_handle_t h245_handle; static dissector_handle_t nsp_handle; static dissector_handle_t data_handle; static dissector_handle_t MultimediaSystemControlMessage_handle; -static dissector_handle_t h263_handle = NULL; -static dissector_handle_t amr_handle = NULL; +static dissector_handle_t h263_handle; +static dissector_handle_t amr_handle; static void init_h245_packet_info(h245_packet_info *pi); static int hf_h245_pdu_type; @@ -74,8 +74,8 @@ static int hf_h245_debug_dissector_try_string; h245_packet_info *h245_pi=NULL; static bool h245_reassembly = true; -static bool h245_shorttypes = false; -static bool info_col_fmt_prepend = false; +static bool h245_shorttypes; +static bool info_col_fmt_prepend; typedef enum _AudioCapability_enum { @@ -318,7 +318,7 @@ static const value_string h245_AudioCapability_short_vals[] = { /* To put the codec type only in COL_INFO when an OLC is read */ -const char* codec_type = NULL; +const char* codec_type; static guint32 rfc_number; typedef struct _unicast_addr_t { @@ -343,10 +343,10 @@ typedef struct _olc_info_t { channel_info_t rev_lc; } olc_info_t; -static wmem_map_t* h245_pending_olc_reqs = NULL; -static gboolean fast_start = FALSE; -static olc_info_t *upcoming_olc = NULL; -static channel_info_t *upcoming_channel = NULL; +static wmem_map_t* h245_pending_olc_reqs; +static gboolean fast_start; +static olc_info_t *upcoming_olc; +static channel_info_t *upcoming_channel; /* NonStandardParameter */ static const char *nsiOID; @@ -378,7 +378,7 @@ static const value_string h245_h239subMessageIdentifier_vals[] = { /* h223 multiplex codes */ -static h223_set_mc_handle_t h223_set_mc_handle = NULL; +static h223_set_mc_handle_t h223_set_mc_handle; h223_mux_element *h223_me=NULL; guint8 h223_mc=0; void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ) @@ -392,7 +392,7 @@ typedef struct { h223_lc_params *rev_channel_params; } h223_pending_olc; -static wmem_map_t* h223_pending_olc_reqs[] = { NULL, NULL }; +static wmem_map_t* h223_pending_olc_reqs[2]; static dissector_handle_t h245_lc_dissector; static guint16 h245_lc_temp; static guint16 h223_fw_lc_num; @@ -400,7 +400,7 @@ static guint16 h223_rev_lc_num; static h223_lc_params *h223_lc_params_temp; static h223_lc_params *h223_fw_lc_params; static h223_lc_params *h223_rev_lc_params; -static h223_add_lc_handle_t h223_add_lc_handle = NULL; +static h223_add_lc_handle_t h223_add_lc_handle; static void h223_lc_init( void ) { diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index f45cd81a48..bf954dc430 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -592,10 +592,10 @@ const value_string gcp_term_types[] = { { 0, NULL } }; -static wmem_tree_t* gcp_msgs = NULL; -static wmem_tree_t* gcp_trxs = NULL; -static wmem_tree_t* gcp_ctxs_by_trx = NULL; -static wmem_tree_t* gcp_ctxs = NULL; +static wmem_tree_t* gcp_msgs; +static wmem_tree_t* gcp_trxs; +static wmem_tree_t* gcp_ctxs_by_trx; +static wmem_tree_t* gcp_ctxs; gcp_msg_t* gcp_msg(packet_info* pinfo, int o, gboolean keep_persistent_data) { gcp_msg_t* m; @@ -1292,7 +1292,7 @@ void gcp_analyze_msg(proto_tree* gcp_tree, packet_info* pinfo, tvbuff_t* gcp_tvb /* END Gateway Control Protocol -- Context Tracking */ #define H248_PORT 2945 -static bool keep_persistent_data = false; +static bool keep_persistent_data; static bool h248_desegment = true; @@ -1880,9 +1880,9 @@ static const value_string wildcard_levels[] = { { 0, NULL } }; -static h248_curr_info_t curr_info = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; +static h248_curr_info_t curr_info; static guint32 error_code; -static guint32 h248_version = 0; /* h248v1 support */ +static guint32 h248_version; /* h248v1 support */ static gcp_wildcard_t wild_term; static guint8 wild_card = 0xFF; /* place to store wildcardField */ @@ -1950,7 +1950,7 @@ static const h248_pkg_param_t no_param = { 0, &hf_h248_param, h248_param_uint_it static const h248_pkg_evt_t no_event = { 0, &hf_h248_no_evt, &ett_h248_no_evt, NULL, NULL }; static const h248_package_t *find_package_id(guint16 pkgid); -static wmem_tree_t* packages = NULL; +static wmem_tree_t* packages; extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u1 _U_, void* u2 _U_) { tvbuff_t *new_tvb = NULL; diff --git a/epan/dissectors/packet-h248_3gpp.c b/epan/dissectors/packet-h248_3gpp.c index 4d79171c71..cb9293e4ab 100644 --- a/epan/dissectors/packet-h248_3gpp.c +++ b/epan/dissectors/packet-h248_3gpp.c @@ -42,7 +42,7 @@ static int hf_h248_package_3GUP_initdir; static gint ett_h248_package_3GUP; -static gboolean implicit = FALSE; +static gboolean implicit; static const value_string h248_3GUP_properties_vals[] = { { 0x0000, "threegup (3G User Plane)" }, diff --git a/epan/dissectors/packet-h248_annex_e.c b/epan/dissectors/packet-h248_annex_e.c index 39f2074571..9bba27685b 100644 --- a/epan/dissectors/packet-h248_annex_e.c +++ b/epan/dissectors/packet-h248_annex_e.c @@ -29,8 +29,8 @@ void proto_register_h248_annex_e(void); */ static int proto_h248_annex_E; -static gboolean h248_e_implicit = FALSE; -static gboolean implicit = FALSE; +static gboolean h248_e_implicit; +static gboolean implicit; /* H.248.1 E.1 Generic Package */ static int hf_h248_pkg_generic; diff --git a/epan/dissectors/packet-h248_q1950.c b/epan/dissectors/packet-h248_q1950.c index ba06cee10b..d65d58721e 100644 --- a/epan/dissectors/packet-h248_q1950.c +++ b/epan/dissectors/packet-h248_q1950.c @@ -30,7 +30,7 @@ void proto_register_q1950(void); #define PFNAME "h248q1950" static int proto_q1950; -static bool implicit = FALSE; +static bool implicit; /* A.3 Bearer characteristics package */ static int hf_h248_pkg_BCP; @@ -269,7 +269,7 @@ static h248_package_t h248_pkg_GB = { /* A.7 Bearer control tunnelling package */ -static dissector_handle_t bctp_dissector = NULL; +static dissector_handle_t bctp_dissector; static int hf_h248_pkg_bt; static int hf_h248_pkg_bt_tind; diff --git a/epan/dissectors/packet-h265.c b/epan/dissectors/packet-h265.c index 4898294cfd..764475852c 100644 --- a/epan/dissectors/packet-h265.c +++ b/epan/dissectors/packet-h265.c @@ -396,12 +396,12 @@ static expert_field ei_h265_value_to_large; static dissector_handle_t h265_handle; -static gboolean dependent_slice_segments_enabled_flag = 0; -static guint num_extra_slice_header_bits = 0; -static guint log2_min_luma_coding_block_size_minus3 = 0; -static guint log2_diff_max_min_luma_coding_block_size = 0; -static guint pic_width_in_luma_samples = 0; -static guint pic_height_in_luma_samples = 0; +static gboolean dependent_slice_segments_enabled_flag; +static guint num_extra_slice_header_bits; +static guint log2_min_luma_coding_block_size_minus3; +static guint log2_diff_max_min_luma_coding_block_size; +static guint pic_width_in_luma_samples; +static guint pic_height_in_luma_samples; /* syntax tables in subclause 7.3 is equal to * ue(v), me(v), se(v), or te(v). diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index 0b506da19d..0b470f5359 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -69,7 +69,7 @@ static expert_field ei_ros_undecoded; /* Preferences */ /* Subdissectors */ -static dissector_handle_t data_handle = NULL; +static dissector_handle_t data_handle; /* Global variables */ static gint32 problem_val; diff --git a/epan/dissectors/packet-h460.c b/epan/dissectors/packet-h460.c index c014365197..4748dc1e75 100644 --- a/epan/dissectors/packet-h460.c +++ b/epan/dissectors/packet-h460.c @@ -330,8 +330,8 @@ static gint ett_h460_21_TransmitCapabilities; static dissector_handle_t h460_name_handle; /* Subdissectors */ -static dissector_handle_t q931_ie_handle = NULL; -static dissector_handle_t h225_ras_handle = NULL; +static dissector_handle_t q931_ie_handle; +static dissector_handle_t h225_ras_handle; /* --- Module NUMBER-PORTABILITY --- --- --- */ diff --git a/epan/dissectors/packet-hci_mon.c b/epan/dissectors/packet-hci_mon.c index 99e98c82e1..d4f0704562 100644 --- a/epan/dissectors/packet-hci_mon.c +++ b/epan/dissectors/packet-hci_mon.c @@ -48,7 +48,7 @@ static gint ett_flags; static expert_field ei_unknown_data; -static wmem_tree_t *adapter_to_disconnect_in_frame = NULL; +static wmem_tree_t *adapter_to_disconnect_in_frame; static dissector_handle_t hci_mon_handle; static dissector_handle_t bthci_cmd_handle; diff --git a/epan/dissectors/packet-hci_usb.c b/epan/dissectors/packet-hci_usb.c index 2b25560ab9..225271622f 100644 --- a/epan/dissectors/packet-hci_usb.c +++ b/epan/dissectors/packet-hci_usb.c @@ -44,7 +44,7 @@ static int hf_msg_fragment_count; static int hf_msg_reassembled_in; static int hf_msg_reassembled_length; -static wmem_tree_t *fragment_info_table = NULL; +static wmem_tree_t *fragment_info_table; static reassembly_table hci_usb_reassembly_table; diff --git a/epan/dissectors/packet-hdcp2.c b/epan/dissectors/packet-hdcp2.c index 9a36fef114..296b2150a9 100644 --- a/epan/dissectors/packet-hdcp2.c +++ b/epan/dissectors/packet-hdcp2.c @@ -106,7 +106,7 @@ typedef struct _msg_info_t { guint16 len; /* number of bytes following initial msg_id field */ } msg_info_t; -static wmem_map_t *msg_table = NULL; +static wmem_map_t *msg_table; static const msg_info_t msg_info[] = { { ID_AKE_INIT, 8 }, diff --git a/epan/dissectors/packet-hdfs.c b/epan/dissectors/packet-hdfs.c index f65c507eeb..04359b8b8a 100644 --- a/epan/dissectors/packet-hdfs.c +++ b/epan/dissectors/packet-hdfs.c @@ -42,12 +42,12 @@ void proto_reg_handoff_hdfs(void); #if 0 -static const int START = 0; +static const int START; static const int AUTHENTICATION = 1; static const int DATA = 2; #endif -static range_t *tcp_ports = NULL; +static range_t *tcp_ports; static int proto_hdfs; static int hf_hdfs_pdu_type; diff --git a/epan/dissectors/packet-hl7.c b/epan/dissectors/packet-hl7.c index 191fcb237c..0b6f9ceefe 100644 --- a/epan/dissectors/packet-hl7.c +++ b/epan/dissectors/packet-hl7.c @@ -71,11 +71,11 @@ static expert_field ei_hl7_malformed; /* FF: global_hl7_raw determines whether we are going to display * the raw text of the HL7 message (like SIP and MEGACO dissectors) */ -static bool global_hl7_raw = false; +static bool global_hl7_raw; /* FF: global_hl7_llp determines whether we are going to display * the LLP block markers */ -static bool global_hl7_llp = false; +static bool global_hl7_llp; /* as per Health Level Seven, Version 2.6, appendix A */ static const string_string hl7_msg_type_vals[] = { diff --git a/epan/dissectors/packet-homeplug-av.c b/epan/dissectors/packet-homeplug-av.c index deefba5639..35e63965c2 100644 --- a/epan/dissectors/packet-homeplug-av.c +++ b/epan/dissectors/packet-homeplug-av.c @@ -812,7 +812,7 @@ static gint ett_homeplug_av_st_iotecha_bss_entry; /* End of ST/IoTecha specific subtrees */ /* Saving vendor specific subtree */ -static proto_tree *ti_vendor = 0; +static proto_tree *ti_vendor; #define HOMEPLUG_AV_MMHDR_LEN 3 /* MM version (1) + MM type (2) */ diff --git a/epan/dissectors/packet-homeplug.c b/epan/dissectors/packet-homeplug.c index c5cd33170a..388255d802 100644 --- a/epan/dissectors/packet-homeplug.c +++ b/epan/dissectors/packet-homeplug.c @@ -220,11 +220,11 @@ static gint ett_homeplug_stc; static expert_field ei_homeplug_tone_map_not_exist; -static guint8 homeplug_ne = 0; -static guint8 homeplug_melen = 0; -static guint8 homeplug_metype = 0; +static guint8 homeplug_ne; +static guint8 homeplug_melen; +static guint8 homeplug_metype; -static guint32 homeplug_offset = 0; +static guint32 homeplug_offset; /* METYPE Values */ diff --git a/epan/dissectors/packet-hsfz.c b/epan/dissectors/packet-hsfz.c index 74397cacc9..5ec17e1e3a 100644 --- a/epan/dissectors/packet-hsfz.c +++ b/epan/dissectors/packet-hsfz.c @@ -91,13 +91,13 @@ typedef struct _udf_one_id_string { } udf_one_id_string_t; /*** Hash Tables for lookup data ***/ -static GHashTable *ht_diag_addr = NULL; +static GHashTable *ht_diag_addr; -static bool hsfz_check_header = false; -static bool hsfz_show_uds_in_ack = false; +static bool hsfz_check_header; +static bool hsfz_show_uds_in_ack; -static udf_one_id_string_t *udf_diag_addr = NULL; -static guint udf_diag_addr_num = 0; +static udf_one_id_string_t *udf_diag_addr; +static guint udf_diag_addr_num; static void * udf_copy_one_id_string_cb(void* n, const void* o, size_t size _U_) { diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index c5b5be4a59..4e3ce5ae0b 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -295,11 +295,11 @@ static bool http_check_ascii_headers = false; #define SCTP_DEFAULT_RANGE "80" #define TLS_DEFAULT_RANGE "443" -static range_t *global_http_tls_range = NULL; +static range_t *global_http_tls_range; -static range_t *http_tcp_range = NULL; -static range_t *http_sctp_range = NULL; -static range_t *http_tls_range = NULL; +static range_t *http_tcp_range; +static range_t *http_sctp_range; +static range_t *http_tls_range; typedef void (*ReqRespDissector)(packet_info*, tvbuff_t*, proto_tree*, int, const guchar*, const guchar*, http_conv_t *, http_req_res_t *); @@ -788,11 +788,11 @@ static int st_node_requests_by_referer = -1; static const gchar *st_str_request_sequences = "HTTP Request Sequences"; /* Mapping of URIs to the most-recently seen node id */ -static wmem_map_t* refstats_uri_to_node_id_hash = NULL; +static wmem_map_t* refstats_uri_to_node_id_hash; /* Mapping of node ids to the node's URI ('name' value) */ -static wmem_map_t* refstats_node_id_to_uri_hash = NULL; +static wmem_map_t* refstats_node_id_to_uri_hash; /* Mapping of node ids to the parent node id */ -static wmem_map_t* refstats_node_id_to_parent_node_id_hash = NULL; +static wmem_map_t* refstats_node_id_to_parent_node_id_hash; /* HTTP/Request Sequences stats init function */ diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c index 9a0ce4025d..7db3dc634f 100644 --- a/epan/dissectors/packet-http2.c +++ b/epan/dissectors/packet-http2.c @@ -79,7 +79,7 @@ VALUE_STRING_ARRAY(http2_header_repr_type); #if defined(HAVE_ZLIB) || defined(HAVE_BROTLI) static gboolean http2_decompress_body = TRUE; #else -static gboolean http2_decompress_body = FALSE; +static gboolean http2_decompress_body; #endif /* Try to dissect reassembled http2.data.data according to content-type later */ @@ -301,7 +301,7 @@ decode_as_http2_populate_list(const gchar* table_name _U_, decode_as_add_to_list #endif /*HAVE_NGHTTP2*/ -static GHashTable* streamid_hash = NULL; +static GHashTable* streamid_hash; void proto_register_http2(void); void proto_reg_handoff_http2(void); @@ -555,9 +555,9 @@ static const fragment_items http2_body_fragment_items = { bytes. We reduce memory usage by caching header field in this wmem_map_t to reuse its memory region when we see the same header field next time. */ -static wmem_map_t *http2_hdrcache_map = NULL; +static wmem_map_t *http2_hdrcache_map; /* Header name_length + name + value_length + value */ -static char *http2_header_pstr = NULL; +static char *http2_header_pstr; #endif #ifdef HAVE_NGHTTP2 @@ -574,11 +574,11 @@ typedef struct _header_field_t { gchar* header_desc; } header_field_t; -static header_field_t* header_fields = NULL; -static guint num_header_fields = 0; -static guint num_header_fields_cleanup = 0; +static header_field_t* header_fields; +static guint num_header_fields; +static guint num_header_fields_cleanup; -static GHashTable* header_fields_hash = NULL; +static GHashTable* header_fields_hash; static bool header_fields_update_cb(void *r, char **err) @@ -644,7 +644,7 @@ header_fields_free_cb(void*r) } -static hf_register_info* hf_uat = NULL; +static hf_register_info* hf_uat; static void deregister_header_fields(void) @@ -1057,8 +1057,8 @@ typedef struct { gboolean enable; /* enable or disable this rule */ } http2_fake_header_t; -static http2_fake_header_t* http2_fake_headers = NULL; -static guint num_http2_fake_headers = 0; +static http2_fake_header_t* http2_fake_headers; +static guint num_http2_fake_headers; static void* http2_fake_headers_copy_cb(void* n, const void* o, size_t siz _U_) diff --git a/epan/dissectors/packet-http3.c b/epan/dissectors/packet-http3.c index 052ca7e427..53c8502b48 100644 --- a/epan/dissectors/packet-http3.c +++ b/epan/dissectors/packet-http3.c @@ -496,7 +496,7 @@ static http3_file_local_ctx *http3_get_file_local_ctx(void); * It is allocated with file scoped memory, and then either placed in the * cache map or, if it matches something already in the cache map, the * memory is reallocated for the next header encountered. */ -static char *http3_header_pstr = NULL; +static char *http3_header_pstr; #endif /** @@ -653,7 +653,7 @@ http3_initialize_qpack_decoders(http3_session_info_t *http3_session) } } -static GHashTable *header_fields_hash = NULL; +static GHashTable *header_fields_hash; static const char * cid_to_string(const quic_cid_t *cid, wmem_allocator_t *scope) @@ -2693,7 +2693,7 @@ proto_reg_handoff_http3(void) /** * Implementation of helper functions. */ -static http3_file_local_ctx *g_http3_file_local_ctx = NULL; +static http3_file_local_ctx *g_http3_file_local_ctx; static guint http3_conn_info_hash(gconstpointer key) diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c index adba842c6c..dd2141cb9e 100644 --- a/epan/dissectors/packet-iax2.c +++ b/epan/dissectors/packet-iax2.c @@ -624,11 +624,11 @@ typedef struct { } iax_circuit_key; /* tables */ -static GHashTable *iax_fid_table = NULL; +static GHashTable *iax_fid_table; static reassembly_table iax_reassembly_table; -static GHashTable *iax_circuit_hashtab = NULL; -static guint circuitcount = 0; +static GHashTable *iax_circuit_hashtab; +static guint circuitcount; /* the number of keys and values to reserve space for in each memory chunk. We assume we won't be tracking many calls at once so this is quite low. diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index 0c5babfcd8..5e5ca83d52 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -68,7 +68,7 @@ static icmp_transaction_t *transaction_end(packet_info * pinfo, /* Decode the end of the ICMP payload as ICMP MPLS extensions if the packet in the payload has more than 128 bytes */ -static bool favor_icmp_mpls_ext = false; +static bool favor_icmp_mpls_ext; static int proto_icmp; diff --git a/epan/dissectors/packet-idmp.c b/epan/dissectors/packet-idmp.c index 546b41dce4..595738c464 100644 --- a/epan/dissectors/packet-idmp.c +++ b/epan/dissectors/packet-idmp.c @@ -45,11 +45,11 @@ void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int p static bool idmp_desegment = true; #define IDMP_TCP_PORT 1102 /* made up for now - not IANA registered */ static bool idmp_reassemble = true; -static dissector_handle_t idmp_handle = NULL; +static dissector_handle_t idmp_handle; -static proto_tree *top_tree = NULL; -static const char *protocolID = NULL; -static const char *saved_protocolID = NULL; +static proto_tree *top_tree; +static const char *protocolID; +static const char *saved_protocolID; static guint32 opcode = -1; /* Initialize the protocol and registered fields */ diff --git a/epan/dissectors/packet-ieee1609dot2.c b/epan/dissectors/packet-ieee1609dot2.c index 1acfe3411d..61720f25b1 100644 --- a/epan/dissectors/packet-ieee1609dot2.c +++ b/epan/dissectors/packet-ieee1609dot2.c @@ -41,7 +41,7 @@ void proto_reg_handoff_ieee1609dot2(void); /* Initialize the protocol and registered fields */ int proto_ieee1609dot2; -dissector_handle_t proto_ieee1609dot2_handle = NULL; +dissector_handle_t proto_ieee1609dot2_handle; static int hf_ieee1609dot2_SecuredCrl_PDU; /* SecuredCrl */ static int hf_ieee1609dot2_Ieee1609Dot2Data_PDU; /* Ieee1609Dot2Data */ static int hf_ieee1609dot2_SequenceOfUint8_item; /* Uint8 */ diff --git a/epan/dissectors/packet-ieee1722.c b/epan/dissectors/packet-ieee1722.c index 90693d5ce0..e588ce38cc 100644 --- a/epan/dissectors/packet-ieee1722.c +++ b/epan/dissectors/packet-ieee1722.c @@ -800,7 +800,7 @@ static dissector_handle_t avb1722_can_handle; static int proto_can; static int proto_canfd; -static bool can_heuristic_first = false; +static bool can_heuristic_first; /**************************************************************************************************/ /* ACF LIN Message */ diff --git a/epan/dissectors/packet-ieee80211-radio.c b/epan/dissectors/packet-ieee80211-radio.c index 53f928928e..bc05e27833 100644 --- a/epan/dissectors/packet-ieee80211-radio.c +++ b/epan/dissectors/packet-ieee80211-radio.c @@ -102,9 +102,9 @@ static int wlan_radio_tap; static int wlan_radio_timeline_tap; /* Settings */ -static bool wlan_radio_always_short_preamble = false; +static bool wlan_radio_always_short_preamble; static bool wlan_radio_tsf_at_end = true; -static bool wlan_radio_timeline_enabled = false; +static bool wlan_radio_timeline_enabled; static const value_string phy_vals[] = { { PHDR_802_11_PHY_11_FHSS, "802.11 FHSS" }, diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index 01b0520f01..c223935d6b 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -667,8 +667,8 @@ static capture_dissector_handle_t ieee80211_datapad_cap_handle; static dissector_table_t vendor_dissector_table; /* Settings */ -static bool radiotap_bit14_fcs = false; -static bool radiotap_interpret_high_rates_as_mcs = false; +static bool radiotap_bit14_fcs; +static bool radiotap_interpret_high_rates_as_mcs; #define USE_FCS_BIT 0 #define ASSUME_FCS_PRESENT 1 diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 321854be29..ecc610c9a6 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -115,7 +115,7 @@ static const unit_name_string units_10_ms = { " times 10 milliseconds", NULL }; * This is based on looking at BEACONs, or perhaps from the radiotap header * if we get one. */ -static wmem_map_t *sta_prop_hash = NULL; +static wmem_map_t *sta_prop_hash; /* * Not sure that they can be both, so are bit values wanted? @@ -154,13 +154,13 @@ static bool wlan_defragment = true; static bool wlan_subdissector = true; /* Check for the presence of the 802.11 FCS */ -static bool wlan_check_fcs = false; +static bool wlan_check_fcs; /* Check the FCS checksum */ -static bool wlan_check_checksum = false; +static bool wlan_check_checksum; /* Ignore vendor-specific HT elements */ -static bool wlan_ignore_draft_ht = false; +static bool wlan_ignore_draft_ht; /* Ignore the Protection bit; assume packet is decrypted */ #define WLAN_IGNORE_PROT_NO 0 @@ -169,18 +169,18 @@ static bool wlan_ignore_draft_ht = false; static gint wlan_ignore_prot = WLAN_IGNORE_PROT_NO; /* The Key MIC len has been set by the user */ -static bool wlan_key_mic_len_enable = false; -static guint wlan_key_mic_len = 0; +static bool wlan_key_mic_len_enable; +static guint wlan_key_mic_len; /* Counter incremented on each (re)association * This value will be assiged to each packet's pinfo->srcport/pinfo->destport * as a way to uniquely make a one to one mapping between conversations and * associations */ -static guint32 association_counter = 0; +static guint32 association_counter; /* Treat all Wi-Fi frames as being S1G frames where it is important */ -static bool treat_as_s1g = false; +static bool treat_as_s1g; /* Table for reassembly of fragments. */ static reassembly_table wlan_reassembly_table; @@ -192,9 +192,9 @@ static struct _wlan_stats wlan_stats; * UAT for WEP decoder *------------------------------------- */ -static uat_wep_key_record_t *uat_wep_key_records = NULL; -static uat_t *wep_uat = NULL; -static guint num_wepkeys_uat = 0; +static uat_wep_key_record_t *uat_wep_key_records; +static uat_t *wep_uat; +static guint num_wepkeys_uat; static void * uat_wep_key_record_copy_cb(void* n, const void* o, size_t siz _U_) @@ -3688,7 +3688,7 @@ static const value_string fils_discovery_capability_fils_minimum_rate_he[] = { static int proto_wlan; static int proto_centrino; static int proto_aggregate; -static gboolean ieee80211_tvb_invalid = FALSE; +static gboolean ieee80211_tvb_invalid; /* ************************************************************************* */ /* Header field info values for FC-field */ @@ -3779,8 +3779,8 @@ typedef struct retransmit_key { guint fnum; } retransmit_key; -static GHashTable *fc_analyse_retransmit_table = NULL; -static GHashTable *fc_first_frame_table = NULL; +static GHashTable *fc_analyse_retransmit_table; +static GHashTable *fc_first_frame_table; static int hf_ieee80211_fc_analysis_retransmission; static int hf_ieee80211_fc_analysis_retransmission_frame; @@ -8740,7 +8740,7 @@ static int wlan_bssid_address_type = -1; static int wlan_ra_ta_address_type = -1; static int wlan_aid_address_type = -1; -static int beacon_padding = 0; /* beacon padding bug */ +static int beacon_padding; /* beacon padding bug */ /* * Check if we have an S1G STA @@ -8852,7 +8852,7 @@ static const val64_string number_of_taps_values[] = { {0, NULL} }; -DOT11DECRYPT_CONTEXT dot11decrypt_ctx = { 0 }; +DOT11DECRYPT_CONTEXT dot11decrypt_ctx; #define PSMP_STA_INFO_BROADCAST 0 #define PSMP_STA_INFO_MULTICAST 1 @@ -9052,7 +9052,7 @@ partial_tsf_custom(gchar *result, guint32 value) /* * We use this is displaying the ru allocation region. */ -static guint8 global_he_trigger_bw = 0; +static guint8 global_he_trigger_bw; static void he_ru_allocation_base_custom(gchar *result, guint32 ru_allocation) @@ -23880,7 +23880,7 @@ static const value_string s1g_raw_control_raw_type[] = { { 0, NULL } }; -static guint8 global_s1g_raw_type = 0; +static guint8 global_s1g_raw_type; static void s1g_raw_type_options_custom(gchar *result, guint8 raw_type) @@ -24424,7 +24424,7 @@ static const true_false_string relay_direction_tfs = { "Sent by a non-AP STA" }; -static guint relay_function_field = 0; +static guint relay_function_field; static void enable_relay_function_custom(gchar *result, guint8 enable_relay_function) diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index e8a13565cd..447f8c0240 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -188,13 +188,13 @@ typedef enum { static bool ieee802154_fcs_ok = true; /* boolean value set to enable ack tracking */ -static bool ieee802154_ack_tracking = false; +static bool ieee802154_ack_tracking; /* boolean value set to enable 802.15.4e dissection compatibility */ -static bool ieee802154e_compatibility = false; +static bool ieee802154e_compatibility; /* TSCH ASN for nonce in decryption */ -static guint64 ieee802154_tsch_asn = 0; +static guint64 ieee802154_tsch_asn; static const char *ieee802154_user = "User"; @@ -223,9 +223,9 @@ typedef struct { } static_addr_t; /* UAT variables */ -static uat_t *static_addr_uat = NULL; -static static_addr_t *static_addrs = NULL; -static guint num_static_addrs = 0; +static uat_t *static_addr_uat; +static static_addr_t *static_addrs; +static guint num_static_addrs; static void* addr_uat_copy_cb(void *dest, const void *source, size_t len _U_) @@ -281,9 +281,9 @@ UAT_BUFFER_CB_DEF(addr_uat, eui64, static_addr_t, eui64, eui64_len) */ /* UAT variables */ -static uat_t *ieee802154_key_uat = NULL; -static ieee802154_key_t *ieee802154_keys = NULL; -static guint num_ieee802154_keys = 0; +static uat_t *ieee802154_key_uat; +static ieee802154_key_t *ieee802154_keys; +static guint num_ieee802154_keys; static void ieee802154_key_post_update_cb(void) { diff --git a/epan/dissectors/packet-ieee802a.c b/epan/dissectors/packet-ieee802a.c index 13249458f5..e839744dec 100644 --- a/epan/dissectors/packet-ieee802a.c +++ b/epan/dissectors/packet-ieee802a.c @@ -37,7 +37,7 @@ typedef struct { hf_register_info *field_info; } oui_info_t; -static GHashTable *oui_info_table = NULL; +static GHashTable *oui_info_table; /* * Add an entry for a new OUI. diff --git a/epan/dissectors/packet-ifcp.c b/epan/dissectors/packet-ifcp.c index 40040cc99c..85f523f383 100644 --- a/epan/dissectors/packet-ifcp.c +++ b/epan/dissectors/packet-ifcp.c @@ -129,8 +129,8 @@ static int ett_ifcp_frame_len; static bool ifcp_desegment = true; -static dissector_handle_t ifcp_handle = NULL; -static dissector_handle_t fc_handle = NULL; +static dissector_handle_t ifcp_handle; +static dissector_handle_t fc_handle; /* This function checks the first 16 bytes of the "header" that it looks sane diff --git a/epan/dissectors/packet-imap.c b/epan/dissectors/packet-imap.c index 00b7594b8b..f6d26a4ff8 100644 --- a/epan/dissectors/packet-imap.c +++ b/epan/dissectors/packet-imap.c @@ -91,7 +91,7 @@ typedef struct { nstime_t req_time; } imap_request_info_t; -static wmem_map_t *imap_requests = NULL; +static wmem_map_t *imap_requests; static gint imap_request_equal(gconstpointer v, gconstpointer w) diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c index 882370c65d..535542d594 100644 --- a/epan/dissectors/packet-imf.c +++ b/epan/dissectors/packet-imf.c @@ -284,7 +284,7 @@ static struct imf_field imf_fields[] = { {NULL, NULL, NULL, FALSE}, }; -static wmem_map_t *imf_field_table=NULL; +static wmem_map_t *imf_field_table; #define FORMAT_UNSTRUCTURED 0 #define FORMAT_MAILBOX 1 diff --git a/epan/dissectors/packet-inap.c b/epan/dissectors/packet-inap.c index d2c5f3b49c..cf66ae01d8 100644 --- a/epan/dissectors/packet-inap.c +++ b/epan/dissectors/packet-inap.c @@ -1009,8 +1009,8 @@ static dissector_handle_t inap_handle; /* Global variables */ static guint32 opcode=0; static guint32 errorCode=0; -static const char *obj_id = NULL; -static gboolean is_ExtensionField =FALSE; +static const char *obj_id; +static gboolean is_ExtensionField; static int inap_opcode_type; #define INAP_OPCODE_INVOKE 1 @@ -9362,8 +9362,8 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a -static guint8 inap_pdu_type = 0; -static guint8 inap_pdu_size = 0; +static guint8 inap_pdu_type; +static guint8 inap_pdu_size; static int diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c index 7e29a936b9..4bdd2fc197 100644 --- a/epan/dissectors/packet-infiniband.c +++ b/epan/dissectors/packet-infiniband.c @@ -1705,7 +1705,7 @@ typedef struct { /* holds a table of connection contexts being negotiated by CM. the key is a obtained using add_address_to_hash64(initiator address, TransactionID) */ -static GHashTable *CM_context_table = NULL; +static GHashTable *CM_context_table; /* heuristics sub-dissectors list for dissecting the data payload of IB packets */ static heur_dissector_list_t heur_dissectors_payload; diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 623b4ff5a4..e126650afe 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -67,16 +67,16 @@ static bool ip_defragment = true; static bool ip_summary_in_tree = true; /* Perform IP checksum */ -static bool ip_check_checksum = false; +static bool ip_check_checksum; /* Assume TSO and correct zero-length IP packets */ static bool ip_tso_supported = true; /* Use heuristics to determine subdissector */ -static bool try_heuristic_first = false; +static bool try_heuristic_first; /* Interpret the reserved flag as security flag (RFC 3514) */ -static bool ip_security_flag = false; +static bool ip_security_flag; static int proto_ip; diff --git a/epan/dissectors/packet-ipdc.c b/epan/dissectors/packet-ipdc.c index 80dd0ccca8..07adef12f8 100644 --- a/epan/dissectors/packet-ipdc.c +++ b/epan/dissectors/packet-ipdc.c @@ -37,7 +37,7 @@ void proto_register_ipdc(void); void proto_reg_handoff_ipdc(void); -static dissector_handle_t ipdc_tcp_handle = NULL; +static dissector_handle_t ipdc_tcp_handle; #define TCP_PORT_IPDC 6668 /* Not IANA registered */ #define TRANS_ID_SIZE_IPDC 4 diff --git a/epan/dissectors/packet-iperf.c b/epan/dissectors/packet-iperf.c index 04dc342e5d..26eafdba6b 100644 --- a/epan/dissectors/packet-iperf.c +++ b/epan/dissectors/packet-iperf.c @@ -257,8 +257,8 @@ static gint ett_data; static tvbparse_wanted_t *want; static tvbparse_wanted_t *want_trailing; -static dissector_handle_t iperf2_handle_tcp = NULL; -static dissector_handle_t iperf2_handle_udp = NULL; +static dissector_handle_t iperf2_handle_tcp; +static dissector_handle_t iperf2_handle_udp; typedef struct { bool first_packet_processed; diff --git a/epan/dissectors/packet-iperf3.c b/epan/dissectors/packet-iperf3.c index 5427adaca6..e79deaf641 100644 --- a/epan/dissectors/packet-iperf3.c +++ b/epan/dissectors/packet-iperf3.c @@ -75,9 +75,9 @@ static int hf_iperf3_cookie; static int ett_iperf3; static int ett_time; -static dissector_handle_t iperf3_handle_tcp = NULL; -static dissector_handle_t iperf3_handle_udp = NULL; -static dissector_handle_t json_handle = NULL; +static dissector_handle_t iperf3_handle_tcp; +static dissector_handle_t iperf3_handle_udp; +static dissector_handle_t json_handle; static const value_string iperf3_state_vals[] = { { TEST_START, "TEST_START" }, @@ -127,7 +127,7 @@ static udp_conversation_data *udp_set_conversation_data(packet_info *); /* protocol preferences */ -static bool iperf3_pref_64bit_seq_no = false; +static bool iperf3_pref_64bit_seq_no; static bool iperf3_pref_detect_udp_order = true; /* expert info */ static expert_field ei_udp_out_of_order; @@ -159,7 +159,7 @@ DEFINE_CONTROL_PREFACE(UDP) /* invoke as col_info_preface_UDP(pinfo) */ // Collection of cookies used to differentiate between control and data connections. // See dissect_iperf3_tcp() for details. -static wmem_map_t *cookiejar = NULL; +static wmem_map_t *cookiejar; static int dissect_iperf3_control_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) diff --git a/epan/dissectors/packet-ipmi.c b/epan/dissectors/packet-ipmi.c index bfd4911a2f..f818ce3ea1 100644 --- a/epan/dissectors/packet-ipmi.c +++ b/epan/dissectors/packet-ipmi.c @@ -127,10 +127,10 @@ static gint proto_tmode; /* WARNING: Setting this to true might result in the entire dissector being disabled by default or removed completely. */ -static bool dissect_bus_commands = false; +static bool dissect_bus_commands; static bool fru_langcode_is_english = true; static guint response_after_req = 5000; -static guint response_before_req = 0; +static guint response_before_req; static guint message_format = MSGFMT_GUESS; static guint selected_oem = IPMI_OEM_NONE; diff --git a/epan/dissectors/packet-ippusb.c b/epan/dissectors/packet-ippusb.c index d50f564f0f..f7b2b2f14c 100644 --- a/epan/dissectors/packet-ippusb.c +++ b/epan/dissectors/packet-ippusb.c @@ -43,7 +43,7 @@ static const guint8 CHUNKED_END[] = { 0x30, 0x0d, 0x0a, 0x0d, 0x0a }; static const guint8 RETURN_NEWLINE[] = { 0x0d, 0x0a }; -static tvbuff_t *return_newline_tvb = NULL; +static tvbuff_t *return_newline_tvb; void proto_register_ippusb(void); void proto_reg_handoff_ippusb(void); diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index 98279d269e..8ac5380c2e 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -273,7 +273,7 @@ typedef struct { guint32 sn_upper; } uat_esp_sa_record_t; -static uat_esp_sa_record_t *uat_esp_sa_records = NULL; +static uat_esp_sa_record_t *uat_esp_sa_records; /* Extra SA records that may be set programmatically */ /* 'records' array is now allocated on the heap */ @@ -284,8 +284,8 @@ typedef struct extra_esp_sa_records_t { } extra_esp_sa_records_t; static extra_esp_sa_records_t extra_esp_sa_records; -static uat_t * esp_uat = NULL; -static guint num_sa_uat = 0; +static uat_t * esp_uat; +static guint num_sa_uat; /* Name : static gint compute_ascii_key(gchar **ascii_key, gchar *key) @@ -548,10 +548,10 @@ void esp_sa_record_add_from_dissector(guint8 protocol, const gchar *srcIP, const /* Preference settings */ /* Default ESP payload decode to off */ -static bool g_esp_enable_encryption_decode = false; +static bool g_esp_enable_encryption_decode; /* Default ESP payload Authentication Checking to off */ -static bool g_esp_enable_authentication_check = false; +static bool g_esp_enable_authentication_check; /**************************************************/ /* Sequence number analysis */ @@ -566,12 +566,12 @@ typedef struct /* The sequence analysis SPI hash table. Maps SPI -> spi_status */ -static wmem_map_t *esp_sequence_analysis_hash = NULL; +static wmem_map_t *esp_sequence_analysis_hash; /* Results are stored here: framenum -> spi_status */ /* N.B. only store entries for out-of-order frames, if there is no entry for a given frame, it was found to be in-order */ -static wmem_map_t *esp_sequence_analysis_report_hash = NULL; +static wmem_map_t *esp_sequence_analysis_report_hash; /* During the first pass, update the SPI state. If the sequence numbers are out of order, add an entry to the report table */ @@ -658,7 +658,7 @@ static void show_esp_sequence_info(guint32 spi, guint32 sequence_number, (only works if payload is NULL encrypted and ESP payload decode is off or payload is NULL encrypted and the packet does not match a Security Association). */ -static bool g_esp_enable_null_encryption_decode_heuristic = false; +static bool g_esp_enable_null_encryption_decode_heuristic; /* Default to doing ESP sequence analysis */ static bool g_esp_do_sequence_analysis = true; diff --git a/epan/dissectors/packet-ipsi-ctl.c b/epan/dissectors/packet-ipsi-ctl.c index 7e22129e6c..1cc64801ff 100644 --- a/epan/dissectors/packet-ipsi-ctl.c +++ b/epan/dissectors/packet-ipsi-ctl.c @@ -19,7 +19,7 @@ void proto_register_ipsictl(void); void proto_reg_handoff_ipsictl(void); -static dissector_handle_t ipsictl_handle = NULL; +static dissector_handle_t ipsictl_handle; #define IPSICTL_PORT 5010 /* Not IANA registered */ #define IPSICTL_PDU_MAGIC 0x0300 diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index 767133c28a..7c7fa3f075 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -711,9 +711,9 @@ struct nat64_prefix_data { }; -static uat_t *nat64_prefix_uat = NULL; -static struct nat64_prefix_data *nat64_prefix_uats = NULL; -static guint number_of_nat64_prefix = 0; +static uat_t *nat64_prefix_uat; +static struct nat64_prefix_data *nat64_prefix_uats; +static guint number_of_nat64_prefix; UAT_CSTRING_CB_DEF(nat64_prefix_uats, ipaddr, struct nat64_prefix_data) @@ -825,19 +825,19 @@ static bool ipv6_summary_in_tree = true; static bool ipv6_address_detail = true; /* Perform strict RFC adherence checking */ -static bool g_ipv6_rpl_srh_strict_rfc_checking = false; +static bool g_ipv6_rpl_srh_strict_rfc_checking; /* Use heuristics to determine subdissector */ -static bool try_heuristic_first = false; +static bool try_heuristic_first; /* Display IPv6 extension headers under the root tree */ -static bool ipv6_exthdr_under_root = false; +static bool ipv6_exthdr_under_root; /* Hide extension header generated field for length */ -static bool ipv6_exthdr_hide_len_oct_field = false; +static bool ipv6_exthdr_hide_len_oct_field; /* Assume TSO and correct zero-length IP packets */ -static bool ipv6_tso_supported = false; +static bool ipv6_tso_supported; /* * defragmentation of IPv6 diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index ddbb8e3816..55e7cba7b2 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -466,7 +466,7 @@ typedef struct { guint32 num; } spx_rexmit_info; -static wmem_map_t *spx_hash = NULL; +static wmem_map_t *spx_hash; /* Hash Functions */ static gint diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index f1ed56af91..39f74e415e 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -457,7 +457,7 @@ static expert_field ei_isakmp_payload_bad_length; static expert_field ei_isakmp_bad_fragment_number; static expert_field ei_isakmp_notify_data_3gpp_unknown_device_identity; -static dissector_handle_t eap_handle = NULL; +static dissector_handle_t eap_handle; static dissector_handle_t isakmp_handle; @@ -1905,11 +1905,11 @@ typedef struct decrypt_data { } decrypt_data_t; /* IKEv1: Lookup from Initiator-SPI -> decrypt_data_t* */ -static GHashTable *isakmp_hash = NULL; +static GHashTable *isakmp_hash; -static ikev1_uat_data_key_t* ikev1_uat_data = NULL; -static uat_t * ikev1_uat = NULL; -static guint num_ikev1_uat_data = 0; +static ikev1_uat_data_key_t* ikev1_uat_data; +static uat_t * ikev1_uat; +static guint num_ikev1_uat_data; /* Specifications of encryption algorithms for IKEv2 decryption */ typedef struct _ikev2_encr_alg_spec { @@ -2096,12 +2096,12 @@ typedef struct _ikev2_uat_data { ikev2_auth_alg_spec_t *auth_spec; } ikev2_uat_data_t; -static ikev2_uat_data_t* ikev2_uat_data = NULL; -static guint num_ikev2_uat_data = 0; +static ikev2_uat_data_t* ikev2_uat_data; +static guint num_ikev2_uat_data; static uat_t* ikev2_uat; /* IKEv2: (I-SPI, R-SPI) -> ikev2_uat_data_t* */ -static GHashTable *ikev2_key_hash = NULL; +static GHashTable *ikev2_key_hash; #define IKEV2_ENCR_3DES_STR "3DES [RFC2451]" static const value_string vs_ikev2_encr_algs[] = { @@ -2456,7 +2456,7 @@ typedef struct ikev2_fragmentation_state_t { } ikev2_fragmentation_state_t; /* frame_number -> next_payload. The key will be the frame that completes the original message */ -static GHashTable *defrag_next_payload_hash = NULL; +static GHashTable *defrag_next_payload_hash; static void dissect_ikev2_fragmentation(tvbuff_t *, int, proto_tree *, packet_info *, guint32 message_id, guint8 next_payload, gboolean is_request, void* decr_info); diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index 13fafe6851..44807c358a 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -57,13 +57,13 @@ static const value_string ahs_type_vals[] = { {0, NULL} }; -static dissector_handle_t iscsi_handle=NULL; +static dissector_handle_t iscsi_handle; static gint iscsi_protocol_version = ISCSI_PROTOCOL_DRAFT13; static bool iscsi_desegment = true; -static bool demand_good_f_bit = false; +static bool demand_good_f_bit; static bool enable_bogosity_filter = true; static guint32 bogus_pdu_data_length_threshold = 256 * 1024; diff --git a/epan/dissectors/packet-ismacryp.c b/epan/dissectors/packet-ismacryp.c index df63f07e56..987b7acc9e 100644 --- a/epan/dissectors/packet-ismacryp.c +++ b/epan/dissectors/packet-ismacryp.c @@ -87,8 +87,8 @@ static guint key_indicator_length = DEFAULT_KEY_INDICATOR_LENGTH; static bool key_indicator_per_au_flag = DEFAULT_KEY_INDICATOR_PER_AU; /* default key indicator per au */ static guint iv_length = DEFAULT_IV_LENGTH; /* default IV length */ static guint delta_iv_length = DEFAULT_DELTA_IV_LENGTH; /* default delta IV length */ -static bool pref_user_mode = false; /* preference user mode instead of RFC3640 mode? */ -static bool override_flag = false; /* override use of RTP payload type to deduce ISMACryp version */ +static bool pref_user_mode; /* preference user mode instead of RFC3640 mode? */ +static bool override_flag; /* override use of RTP payload type to deduce ISMACryp version */ /* */ @@ -99,7 +99,7 @@ static guint cts_delta_length = DEFAULT_CTS_DELTA_LENGTH; static guint dts_delta_length = DEFAULT_DTS_DELTA_LENGTH; /* default DTS delta length */ static gboolean random_access_indication = DEFAULT_RANDOM_ACCESS_INDICATION; /* default random access indication */ static guint stream_state_indication = DEFAULT_STREAM_STATE_INDICATION; /* default stream state indication */ -static gboolean user_mode = FALSE; /* selected user mode instead of RFC3640 mode? */ +static gboolean user_mode; /* selected user mode instead of RFC3640 mode? */ /*static const value_string messagetypenames[] = {}; */ diff --git a/epan/dissectors/packet-iso10681.c b/epan/dissectors/packet-iso10681.c index dc185e116b..8ca6c4131d 100644 --- a/epan/dissectors/packet-iso10681.c +++ b/epan/dissectors/packet-iso10681.c @@ -126,17 +126,17 @@ static gint ett_iso10681_bandwidth_control; static expert_field ei_iso10681_message_type_bad; static int proto_iso10681; -static dissector_handle_t iso10681_handle_flexray = NULL; +static dissector_handle_t iso10681_handle_flexray; static dissector_table_t subdissector_table; -static range_t *iso10681_flexray_ids = NULL; +static range_t *iso10681_flexray_ids; static bool iso10681_spread_over_multiple_cycles = true; static reassembly_table iso10681_reassembly_table; -static wmem_map_t *iso10681_frame_table = NULL; -static wmem_map_t *iso10681_seq_table = NULL; -static guint32 next_seqnum = 0; +static wmem_map_t *iso10681_frame_table; +static wmem_map_t *iso10681_seq_table; +static guint32 next_seqnum; static int hf_iso10681_fragments; diff --git a/epan/dissectors/packet-iso14443.c b/epan/dissectors/packet-iso14443.c index 1bce26aec0..f9cc78bf22 100644 --- a/epan/dissectors/packet-iso14443.c +++ b/epan/dissectors/packet-iso14443.c @@ -80,7 +80,7 @@ typedef enum _iso14443_cmd_t { CMD_TYPE_UNKNOWN } iso14443_cmd_t; -static wmem_tree_t *transactions = NULL; +static wmem_tree_t *transactions; typedef struct _iso14443_transaction_t { guint32 rqst_frame; diff --git a/epan/dissectors/packet-iso15765.c b/epan/dissectors/packet-iso15765.c index f48d643870..1dc757aa7b 100644 --- a/epan/dissectors/packet-iso15765.c +++ b/epan/dissectors/packet-iso15765.c @@ -128,12 +128,12 @@ static const value_string iso15765_flow_status_types[] = { static gint addressing = NORMAL_ADDRESSING; static gint flexray_addressing = ONE_BYTE_ADDRESSING; -static guint flexray_segment_size_limit = 0; +static guint flexray_segment_size_limit; static guint window = 8; -static range_t *configured_can_ids= NULL; -static range_t *configured_ext_can_ids = NULL; +static range_t *configured_can_ids; +static range_t *configured_ext_can_ids; static bool register_lin_diag_frames = true; -static range_t *configured_ipdum_pdu_ids = NULL; +static range_t *configured_ipdum_pdu_ids; static gint ipdum_addressing = ZERO_BYTE_ADDRESSING; /* Encoding */ @@ -181,16 +181,16 @@ static gint ett_iso15765; static expert_field ei_iso15765_message_type_bad; static int proto_iso15765; -static dissector_handle_t iso15765_handle_can = NULL; -static dissector_handle_t iso15765_handle_lin = NULL; -static dissector_handle_t iso15765_handle_flexray = NULL; -static dissector_handle_t iso15765_handle_ipdum = NULL; -static dissector_handle_t iso15765_handle_pdu_transport = NULL; +static dissector_handle_t iso15765_handle_can; +static dissector_handle_t iso15765_handle_lin; +static dissector_handle_t iso15765_handle_flexray; +static dissector_handle_t iso15765_handle_ipdum; +static dissector_handle_t iso15765_handle_pdu_transport; static dissector_table_t subdissector_table; static reassembly_table iso15765_reassembly_table; -static wmem_map_t *iso15765_frame_table = NULL; +static wmem_map_t *iso15765_frame_table; static int hf_iso15765_fragments; static int hf_iso15765_fragment; @@ -238,8 +238,8 @@ typedef struct config_can_addr_mapping { guint32 ecu_addr_mask; } config_can_addr_mapping_t; -static config_can_addr_mapping_t *config_can_addr_mappings = NULL; -static guint config_can_addr_mappings_num = 0; +static config_can_addr_mapping_t *config_can_addr_mappings; +static guint config_can_addr_mappings_num; #define DATAFILE_CAN_ADDR_MAPPING "ISO15765_can_id_mappings" UAT_BOOL_CB_DEF(config_can_addr_mappings, extended_address, config_can_addr_mapping_t) @@ -391,8 +391,8 @@ typedef struct config_pdu_tranport_config { guint32 ecu_address_fixed; } config_pdu_transport_config_t; -static config_pdu_transport_config_t *config_pdu_transport_config_items = NULL; -static guint config_pdu_transport_config_items_num = 0; +static config_pdu_transport_config_t *config_pdu_transport_config_items; +static guint config_pdu_transport_config_items_num; #define DATAFILE_PDU_TRANSPORT_CONFIG "ISO15765_pdu_transport_config" UAT_HEX_CB_DEF(config_pdu_transport_config_items, pdu_id, config_pdu_transport_config_t) diff --git a/epan/dissectors/packet-iso7816.c b/epan/dissectors/packet-iso7816.c index 742c8eeff1..d2227fa88f 100644 --- a/epan/dissectors/packet-iso7816.c +++ b/epan/dissectors/packet-iso7816.c @@ -33,7 +33,7 @@ static int proto_iso7816_atr; static dissector_handle_t iso7816_handle; static dissector_handle_t iso7816_atr_handle; -static wmem_tree_t *transactions = NULL; +static wmem_tree_t *transactions; static dissector_table_t iso7816_apdu_pld_table; diff --git a/epan/dissectors/packet-iso8583.c b/epan/dissectors/packet-iso8583.c index 059c5f164b..f8a1f4adca 100644 --- a/epan/dissectors/packet-iso8583.c +++ b/epan/dissectors/packet-iso8583.c @@ -348,7 +348,7 @@ static gint ett_iso8583; static expert_field ei_iso8583_MALFORMED; -static struct iso_type *data_array = NULL; +static struct iso_type *data_array; /* Types definitions */ #define ASCII_CHARSET 1 diff --git a/epan/dissectors/packet-isobus-vt.c b/epan/dissectors/packet-isobus-vt.c index 4a33cfecba..b57d6d8d73 100644 --- a/epan/dissectors/packet-isobus-vt.c +++ b/epan/dissectors/packet-isobus-vt.c @@ -21,7 +21,7 @@ void proto_register_isobus_vt(void); void proto_reg_handoff_isobus_vt(void); -static guint8 current_vt_version = 0; +static guint8 current_vt_version; /* Initialize the protocol and registered fields */ static int proto_vt; diff --git a/epan/dissectors/packet-isobus.c b/epan/dissectors/packet-isobus.c index 42c36a53e1..3e5f0aa488 100644 --- a/epan/dissectors/packet-isobus.c +++ b/epan/dissectors/packet-isobus.c @@ -239,7 +239,7 @@ struct address_reassemble_table { guint32 identifierCounter; }; -static wmem_map_t *addressIdentifierTable = NULL; +static wmem_map_t *addressIdentifierTable; static struct reassemble_identifier * findIdentifierFor(wmem_list_t *reassembleIdentifierTable, guint32 frameIndex) { wmem_list_frame_t *currentItem = wmem_list_head(reassembleIdentifierTable); diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c index 517a78cdba..dcaf37087c 100644 --- a/epan/dissectors/packet-isup.c +++ b/epan/dissectors/packet-isup.c @@ -3213,8 +3213,8 @@ static expert_field ei_isup_opt_par_length_err; static dissector_handle_t bicc_handle; -static dissector_handle_t sdp_handle = NULL; -static dissector_handle_t q931_ie_handle = NULL; +static dissector_handle_t sdp_handle; +static dissector_handle_t q931_ie_handle; /* Declarations to desegment APM Messages */ static bool isup_apm_desegment = true; @@ -3245,9 +3245,9 @@ static const fragment_items isup_apm_msg_frag_items = { static reassembly_table isup_apm_msg_reassembly_table; /* Info for the tap that must be passed between procedures */ -static gchar *tap_called_number = NULL; -static gchar *tap_calling_number = NULL; -static guint8 tap_cause_value = 0; +static gchar *tap_called_number; +static gchar *tap_calling_number; +static guint8 tap_cause_value; /* ------------------------------------------------------------------ Mapping number to ASCII-character diff --git a/epan/dissectors/packet-itdm.c b/epan/dissectors/packet-itdm.c index c50289e21d..6b6fd651f2 100644 --- a/epan/dissectors/packet-itdm.c +++ b/epan/dissectors/packet-itdm.c @@ -56,7 +56,7 @@ static dissector_handle_t itdm_handle; /* ZZZZ some magic number.. */ static guint gbl_ItdmMPLSLabel = 0x99887; -static guint gbl_ItdmCTLFlowNo = 0; +static guint gbl_ItdmCTLFlowNo; /* I-TDM 125usec mode commands for data flows */ #define ITDM_CMD_NEW_CHAN 1 diff --git a/epan/dissectors/packet-iua.c b/epan/dissectors/packet-iua.c index 1dac30d64f..ea9ca11ed7 100644 --- a/epan/dissectors/packet-iua.c +++ b/epan/dissectors/packet-iua.c @@ -78,10 +78,10 @@ static gint ett_iua_parameter; /* stores the current SAPI value */ static guint8 sapi_val; -static gboolean sapi_val_assigned = FALSE; +static gboolean sapi_val_assigned; /* option setable via preferences, default is plain RFC 3057 */ -static bool support_IG = false; +static bool support_IG; static dissector_handle_t q931_handle; static dissector_handle_t x25_handle; diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c index 9ae9f429af..e189d0a6fa 100644 --- a/epan/dissectors/packet-iuup.c +++ b/epan/dissectors/packet-iuup.c @@ -124,12 +124,12 @@ static expert_field ei_iuup_time_align; static expert_field ei_iuup_procedure_indicator; static expert_field ei_iuup_pdu_type; -static wmem_map_t* circuits = NULL; +static wmem_map_t* circuits; static dissector_handle_t iuup_handle; -static bool dissect_fields = false; -static bool two_byte_pseudoheader = false; +static bool dissect_fields; +static bool two_byte_pseudoheader; #define PDUTYPE_DATA_WITH_CRC 0 #define PDUTYPE_DATA_NO_CRC 1 diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c index 785f2affe5..f1e6d5f8c6 100644 --- a/epan/dissectors/packet-iwarp-mpa.c +++ b/epan/dissectors/packet-iwarp-mpa.c @@ -103,7 +103,7 @@ static expert_field ei_mpa_reject_bit_responder; static expert_field ei_mpa_bad_length; /* handles of our subdissectors */ -static dissector_handle_t ddp_rdmap_handle = NULL; +static dissector_handle_t ddp_rdmap_handle; static const value_string mpa_messages[] = { { MPA_REQUEST_FRAME, "MPA Request Frame" }, diff --git a/epan/dissectors/packet-ixveriwave.c b/epan/dissectors/packet-ixveriwave.c index f6e000f508..ddbbdcd711 100644 --- a/epan/dissectors/packet-ixveriwave.c +++ b/epan/dissectors/packet-ixveriwave.c @@ -41,7 +41,7 @@ typedef struct ifg_info { guint64 current_start_time; } ifg_info; -static frame_end_data previous_frame_data = {0,0}; +static frame_end_data previous_frame_data; /* static int ieee80211_mhz2ieee(int freq, int flags); */ diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c index 2203ae75fd..c7e9f4e841 100644 --- a/epan/dissectors/packet-json.c +++ b/epan/dissectors/packet-json.c @@ -81,9 +81,9 @@ static gint ett_json_object_raw; static gint ett_json_member_raw; /* Preferences */ -static bool json_compact = false; +static bool json_compact; -static bool json_raw = false; +static bool json_raw; /* Determine whether to hide the tree of original form or root item of compact or raw form * based on the enabled status of compact_form and raw_form preferences. @@ -92,13 +92,13 @@ static bool json_raw = false; * compact_form or raw_form is TRUE, then hide the root item of compact or raw form and put * the content of compact or raw form under the tree item of JSON protocol directly. */ -static bool auto_hide = false; +static bool auto_hide; -static bool ignore_leading_bytes = false; +static bool ignore_leading_bytes; -static bool hide_extended_path_based_filtering = false; +static bool hide_extended_path_based_filtering; -static bool unescape_strings = false; +static bool unescape_strings; static tvbparse_wanted_t* want; static tvbparse_wanted_t* want_ignore; diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 49b75c9ebe..d3837aa576 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -45,7 +45,7 @@ static const gchar JXTA_WELCOME_MSG_SIG[] = { 'J', 'X', 'T', 'A', 'H', 'E', 'L', static const gchar* JXTA_WELCOME_MSG_VERSION_1_1 = "1.1"; static const gchar* JXTA_WELCOME_MSG_VERSION_3_0 = "3.0"; -static const int JXTA_MSG_VERSION_1 = 0; +static const int JXTA_MSG_VERSION_1; static const int JXTA_MSG_VERSION_2 = 1; static const int JXTAMSG1_ELMFLAG_TYPE = 1 << 0; @@ -62,10 +62,10 @@ static int proto_jxta; static int proto_message_jxta; static int jxta_tap; -static dissector_table_t media_type_dissector_table = NULL; -static dissector_handle_t media_handle = NULL; -static dissector_handle_t stream_jxta_handle = NULL; -static dissector_handle_t tls_handle = NULL; +static dissector_table_t media_type_dissector_table; +static dissector_handle_t media_handle; +static dissector_handle_t stream_jxta_handle; +static dissector_handle_t tls_handle; static int hf_uri_addr; static int hf_uri_src; diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c index 58863a0a24..3fa521a873 100644 --- a/epan/dissectors/packet-k12.c +++ b/epan/dissectors/packet-k12.c @@ -61,10 +61,10 @@ static dissector_handle_t fp_handle; extern int proto_sscop; extern int proto_fp; -static wmem_tree_t* port_handles = NULL; -static uat_t* k12_uat = NULL; -static k12_handles_t* k12_handles = NULL; -static guint nk12_handles = 0; +static wmem_tree_t* port_handles; +static uat_t* k12_uat; +static k12_handles_t* k12_handles; +static guint nk12_handles; static const value_string k12_port_types[] = { { K12_PORT_DS1, "Ds1" }, diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c index 6931d3726f..d6eb49839d 100644 --- a/epan/dissectors/packet-kafka.c +++ b/epan/dissectors/packet-kafka.c @@ -701,7 +701,7 @@ static const value_string election_types[] = { /* Whether to show the lengths of string and byte fields in the protocol tree. * It can be useful to see these, but they do clutter up the display, so disable * by default */ -static bool kafka_show_string_bytes_lengths = false; +static bool kafka_show_string_bytes_lengths; typedef struct _kafka_query_response_t { kafka_api_key_t api_key; diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 6d6886d0df..07df0afd90 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -674,7 +674,7 @@ static expert_field ei_kerberos_learnt_keytype; static expert_field ei_kerberos_address; static expert_field ei_krb_gssapi_dlglen; -static dissector_handle_t krb4_handle=NULL; +static dissector_handle_t krb4_handle; /* Global variables */ static guint32 gbl_keytype; @@ -894,7 +894,7 @@ static int dissect_kerberos_defer_PA_FX_FAST_REQUEST(bool implicit_tag _U_, tvbu #ifdef HAVE_KERBEROS /* Decrypt Kerberos blobs */ -bool krb_decrypt = false; +bool krb_decrypt; /* keytab filename */ static const char *keytab_filename = ""; @@ -925,10 +925,10 @@ read_keytab_file_from_preferences(void) #if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS) enc_key_t *enc_key_list=NULL; -static guint kerberos_longterm_ids = 0; -wmem_map_t *kerberos_longterm_keys = NULL; -static wmem_map_t *kerberos_all_keys = NULL; -static wmem_map_t *kerberos_app_session_keys = NULL; +static guint kerberos_longterm_ids; +wmem_map_t *kerberos_longterm_keys; +static wmem_map_t *kerberos_all_keys; +static wmem_map_t *kerberos_app_session_keys; static bool enc_key_list_cb(wmem_allocator_t* allocator _U_, wmem_cb_event_t event _U_, void *user_data _U_) @@ -3185,7 +3185,7 @@ typedef struct _service_key_t { guint8 *contents; char origin[KRB_MAX_ORIG_LEN+1]; } service_key_t; -GSList *service_key_list = NULL; +GSList *service_key_list; static void diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c index 9096b5fdd9..42ccc1a28f 100644 --- a/epan/dissectors/packet-l2tp.c +++ b/epan/dissectors/packet-l2tp.c @@ -1010,7 +1010,7 @@ typedef struct l2tpv3_session { static const gchar* shared_secret = ""; -static GSList *list_heads = NULL; +static GSList *list_heads; static void update_shared_key(l2tpv3_tunnel_t *tunnel) { diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c index 5130052531..c9e04d96fb 100644 --- a/epan/dissectors/packet-lapd.c +++ b/epan/dissectors/packet-lapd.c @@ -81,7 +81,7 @@ static dissector_table_t lapd_sapi_dissector_table; static dissector_table_t lapd_gsm_sapi_dissector_table; /* Whether to use GSM SAPI vals or not */ -static bool global_lapd_gsm_sapis = false; +static bool global_lapd_gsm_sapis; /* * Bits in the address field. diff --git a/epan/dissectors/packet-lbm.c b/epan/dissectors/packet-lbm.c index 904121265f..2e7861b7b3 100644 --- a/epan/dissectors/packet-lbm.c +++ b/epan/dissectors/packet-lbm.c @@ -247,7 +247,7 @@ lbm_transport_sqn_t * lbm_transport_sqn_add(wmem_tree_t * list, lbm_transport_fr /*----------------------------------------------------------------------------*/ /* Topic interface. */ /*----------------------------------------------------------------------------*/ -static wmem_tree_t * lbm_topic_table = NULL; +static wmem_tree_t * lbm_topic_table; #define LBM_TOPIC_KEY_ELEMENT_COUNT 3 #define LBM_TOPIC_KEY_ELEMENT_CHANNEL_HIGH 0 diff --git a/epan/dissectors/packet-lbmc.c b/epan/dissectors/packet-lbmc.c index b019bdb15e..9f2420a495 100644 --- a/epan/dissectors/packet-lbmc.c +++ b/epan/dissectors/packet-lbmc.c @@ -114,7 +114,7 @@ struct lbm_dstream_entry_t_stct #define LBM_ISTREAM_SUBSTREAM_KEY_ELEMENT_DST_PORT 3 #define LBM_ISTREAM_SUBSTREAM_KEY_ELEMENT_LBM_STREAM_ID 4 -static wmem_tree_t * instance_stream_table = NULL; +static wmem_tree_t * instance_stream_table; /* Domain stream variables */ #define LBM_DSTREAM_STREAM_KEY_ELEMENT_COUNT 6 @@ -132,7 +132,7 @@ static wmem_tree_t * instance_stream_table = NULL; #define LBM_DSTREAM_SUBSTREAM_KEY_ELEMENT_DST_PORT 3 #define LBM_DSTREAM_SUBSTREAM_KEY_ELEMENT_LBM_STREAM_ID 4 -static wmem_tree_t * domain_stream_table = NULL; +static wmem_tree_t * domain_stream_table; static void lbm_stream_init(void) { @@ -4549,8 +4549,8 @@ static const true_false_string lbmc_umq_r_flag = /*----------------------------------------------------------------------------*/ static bool lbmc_use_heuristic_subdissectors = true; -static bool lbmc_reassemble_fragments = false; -static bool lbmc_dissect_lbmpdm = false; +static bool lbmc_reassemble_fragments; +static bool lbmc_dissect_lbmpdm; static heur_dissector_list_t lbmc_heuristic_subdissector_list; /*----------------------------------------------------------------------------*/ @@ -6200,7 +6200,7 @@ lbm_uim_seq_analysis_packet(void *ptr, packet_info *pinfo, epan_dissect_t *edt _ #define LBMC_MESSAGE_KEY_ELEMENT_PORT 3 #define LBMC_MESSAGE_KEY_ELEMENT_FIRST_SQN 4 -static wmem_tree_t * lbmc_message_table = NULL; +static wmem_tree_t * lbmc_message_table; typedef struct { diff --git a/epan/dissectors/packet-lbmpdm.c b/epan/dissectors/packet-lbmpdm.c index a0c8146aa2..2cc24b15c9 100644 --- a/epan/dissectors/packet-lbmpdm.c +++ b/epan/dissectors/packet-lbmpdm.c @@ -293,7 +293,7 @@ typedef struct #define LBMPDM_DEFINITION_KEY_ELEMENT_VERS_MAJOR 3 #define LBMPDM_DEFINITION_KEY_ELEMENT_VERS_MINOR 4 -static wmem_tree_t * lbmpdm_definition_table = NULL; +static wmem_tree_t * lbmpdm_definition_table; /*----------------------------------------------------------------------------*/ /* Handles of all types. */ diff --git a/epan/dissectors/packet-lbmpdmtcp.c b/epan/dissectors/packet-lbmpdmtcp.c index 99f1b75d18..4f5113ff6f 100644 --- a/epan/dissectors/packet-lbmpdmtcp.c +++ b/epan/dissectors/packet-lbmpdmtcp.c @@ -109,12 +109,12 @@ static lbmtcp_transport_t * lbmtcp_transport_add(const address * address1, guint /* Global preferences variables (altered by the preferences dialog). */ static guint32 global_lbmpdm_tcp_port_low = LBMPDM_TCP_DEFAULT_PORT_LOW; static guint32 global_lbmpdm_tcp_port_high = LBMPDM_TCP_DEFAULT_PORT_HIGH; -static bool global_lbmpdm_tcp_use_tag = false; +static bool global_lbmpdm_tcp_use_tag; /* Local preferences variables (used by the dissector). */ static guint32 lbmpdm_tcp_port_low = LBMPDM_TCP_DEFAULT_PORT_LOW; static guint32 lbmpdm_tcp_port_high = LBMPDM_TCP_DEFAULT_PORT_HIGH; -static gboolean lbmpdm_tcp_use_tag = FALSE; +static gboolean lbmpdm_tcp_use_tag; /* Tag definitions. */ typedef struct @@ -124,8 +124,8 @@ typedef struct guint32 port_high; } lbmpdm_tcp_tag_entry_t; -static lbmpdm_tcp_tag_entry_t * lbmpdm_tcp_tag_entry = NULL; -static guint lbmpdm_tcp_tag_count = 0; +static lbmpdm_tcp_tag_entry_t * lbmpdm_tcp_tag_entry; +static guint lbmpdm_tcp_tag_count; UAT_CSTRING_CB_DEF(lbmpdm_tcp_tag, name, lbmpdm_tcp_tag_entry_t) UAT_DEC_CB_DEF(lbmpdm_tcp_tag, port_low, lbmpdm_tcp_tag_entry_t) diff --git a/epan/dissectors/packet-lbmr.c b/epan/dissectors/packet-lbmr.c index 7a0840297b..e656e027b2 100644 --- a/epan/dissectors/packet-lbmr.c +++ b/epan/dissectors/packet-lbmr.c @@ -44,7 +44,7 @@ typedef struct guint64 channel; } lbtipc_transport_t; -static wmem_tree_t * lbtipc_transport_table = NULL; +static wmem_tree_t * lbtipc_transport_table; #define LBTIPC_KEY_ELEMENT_COUNT 3 #define LBTIPC_KEY_ELEMENT_HOST_ID 0 @@ -117,7 +117,7 @@ typedef struct guint64 channel; } lbtsmx_transport_t; -static wmem_tree_t * lbtsmx_transport_table = NULL; +static wmem_tree_t * lbtsmx_transport_table; #define LBTSMX_KEY_ELEMENT_COUNT 3 #define LBTSMX_KEY_ELEMENT_HOST_ID 0 @@ -190,7 +190,7 @@ typedef struct guint64 channel; } lbtrdma_transport_t; -static wmem_tree_t * lbtrdma_transport_table = NULL; +static wmem_tree_t * lbtrdma_transport_table; #define LBTRDMA_KEY_ELEMENT_COUNT 3 #define LBTRDMA_KEY_ELEMENT_SOURCE_ADDRESS 0 @@ -1890,18 +1890,18 @@ static guint32 global_lbmr_uc_port_high = LBMR_DEFAULT_UC_PORT_HIGH; static guint32 global_lbmr_uc_port_low = LBMR_DEFAULT_UC_PORT_LOW; static guint32 global_lbmr_uc_dest_port = LBMR_DEFAULT_UC_DEST_PORT; static const char * global_lbmr_uc_address = LBMR_DEFAULT_UC_ADDRESS; -static bool global_lbmr_use_tag = false; +static bool global_lbmr_use_tag; /* Local preferences variables (used by the dissector). */ static guint32 lbmr_mc_incoming_udp_port = LBMR_DEFAULT_MC_INCOMING_UDP_PORT; static guint32 lbmr_mc_outgoing_udp_port = LBMR_DEFAULT_MC_OUTGOING_UDP_PORT; -static guint32 lbmr_mc_incoming_address_host = 0; -static guint32 lbmr_mc_outgoing_address_host = 0; +static guint32 lbmr_mc_incoming_address_host; +static guint32 lbmr_mc_outgoing_address_host; static guint32 lbmr_uc_port_high = LBMR_DEFAULT_UC_PORT_HIGH; static guint32 lbmr_uc_port_low = LBMR_DEFAULT_UC_PORT_LOW; static guint32 lbmr_uc_dest_port = LBMR_DEFAULT_UC_DEST_PORT; -static guint32 lbmr_uc_address_host = 0; -static gboolean lbmr_use_tag = FALSE; +static guint32 lbmr_uc_address_host; +static gboolean lbmr_use_tag; typedef struct { @@ -1919,8 +1919,8 @@ typedef struct guint32 uc_address_val_h; } lbmr_tag_entry_t; -static lbmr_tag_entry_t * lbmr_tag_entry = NULL; -static guint lbmr_tag_count = 0; +static lbmr_tag_entry_t * lbmr_tag_entry; +static guint lbmr_tag_count; UAT_CSTRING_CB_DEF(lbmr_tag, name, lbmr_tag_entry_t) UAT_DEC_CB_DEF(lbmr_tag, mc_outgoing_udp_port, lbmr_tag_entry_t) diff --git a/epan/dissectors/packet-lbmsrs.c b/epan/dissectors/packet-lbmsrs.c index f9db316ad4..0202e2b211 100644 --- a/epan/dissectors/packet-lbmsrs.c +++ b/epan/dissectors/packet-lbmsrs.c @@ -321,7 +321,7 @@ typedef struct } lbmsrs_tag_entry_t; static lbmsrs_tag_entry_t* lbmsrs_tag_entry; -static guint lbmsrs_tag_count = 0; +static guint lbmsrs_tag_count; UAT_CSTRING_CB_DEF(lbmsrs_tag, name, lbmsrs_tag_entry_t) UAT_IPV4_CB_DEF(lbmsrs_tag, ip_address, lbmsrs_tag_entry_t) @@ -562,9 +562,9 @@ static const guint rsocket_stream_id_field_size = 4; static guint32 lbmsrs_source_ip_address; static const char* global_lbmsrs_source_ip_address = LBMSRS_DEFAULT_SOURCE_IP; static guint32 global_lbmsrs_source_port = LBMSRS_DEFAULT_SOURCE_PORT; -static bool global_lbmsrs_use_tag = false; +static bool global_lbmsrs_use_tag; static guint32 lbmsrs_source_port = LBMSRS_DEFAULT_SOURCE_PORT; -static gboolean lbmsrs_use_tag = FALSE; +static gboolean lbmsrs_use_tag; #define RSOCKET_FRAME_RESERVED 0x00 diff --git a/epan/dissectors/packet-lbtrm.c b/epan/dissectors/packet-lbtrm.c index 4b5aa584e1..3db6aa6ea1 100644 --- a/epan/dissectors/packet-lbtrm.c +++ b/epan/dissectors/packet-lbtrm.c @@ -557,26 +557,26 @@ static guint32 global_mim_incoming_dest_port = MIM_DEFAULT_INCOMING_DPORT; static guint32 global_mim_outgoing_dest_port = MIM_DEFAULT_OUTGOING_DPORT; static const char * global_mim_incoming_mc_address = MIM_DEFAULT_MC_INCOMING_ADDRESS; static const char * global_mim_outgoing_mc_address = MIM_DEFAULT_MC_OUTGOING_ADDRESS; -static bool global_lbtrm_expert_separate_naks = false; -static bool global_lbtrm_expert_separate_ncfs = false; -static bool global_lbtrm_use_tag = false; -static bool global_lbtrm_sequence_analysis = false; +static bool global_lbtrm_expert_separate_naks; +static bool global_lbtrm_expert_separate_ncfs; +static bool global_lbtrm_use_tag; +static bool global_lbtrm_sequence_analysis; /* Local preferences variables (used by the dissector). */ -static guint32 lbtrm_mc_address_low_host = 0; -static guint32 lbtrm_mc_address_high_host = 0; +static guint32 lbtrm_mc_address_low_host; +static guint32 lbtrm_mc_address_high_host; static guint32 lbtrm_dest_port_low = LBTRM_DEFAULT_DPORT_LOW; static guint32 lbtrm_dest_port_high = LBTRM_DEFAULT_DPORT_HIGH; static guint32 lbtrm_src_port_low = LBTRM_DEFAULT_SPORT_LOW; static guint32 lbtrm_src_port_high = LBTRM_DEFAULT_SPORT_HIGH; static guint32 mim_incoming_dest_port = MIM_DEFAULT_INCOMING_DPORT; static guint32 mim_outgoing_dest_port = MIM_DEFAULT_OUTGOING_DPORT; -static guint32 mim_incoming_mc_address_host = 0; -static guint32 mim_outgoing_mc_address_host = 0; -static gboolean lbtrm_expert_separate_naks = FALSE; -static gboolean lbtrm_expert_separate_ncfs = FALSE; -static gboolean lbtrm_use_tag = FALSE; -static gboolean lbtrm_sequence_analysis = FALSE; +static guint32 mim_incoming_mc_address_host; +static guint32 mim_outgoing_mc_address_host; +static gboolean lbtrm_expert_separate_naks; +static gboolean lbtrm_expert_separate_ncfs; +static gboolean lbtrm_use_tag; +static gboolean lbtrm_sequence_analysis; /*----------------------------------------------------------------------------*/ /* Tag management. */ @@ -600,8 +600,8 @@ typedef struct guint32 mim_mc_outgoing_address_val_h; } lbtrm_tag_entry_t; -static lbtrm_tag_entry_t * lbtrm_tag_entry = NULL; -static guint lbtrm_tag_count = 0; +static lbtrm_tag_entry_t * lbtrm_tag_entry; +static guint lbtrm_tag_count; UAT_CSTRING_CB_DEF(lbtrm_tag, name, lbtrm_tag_entry_t) UAT_IPV4_MC_CB_DEF(lbtrm_tag, mc_address_low, lbtrm_tag_entry_t) diff --git a/epan/dissectors/packet-lbtru.c b/epan/dissectors/packet-lbtru.c index a981515b0c..51c75248bf 100644 --- a/epan/dissectors/packet-lbtru.c +++ b/epan/dissectors/packet-lbtru.c @@ -633,20 +633,20 @@ static guint32 global_lbtru_source_port_low = LBTRU_DEFAULT_SOURCE_PORT_LOW; static guint32 global_lbtru_source_port_high = LBTRU_DEFAULT_SOURCE_PORT_HIGH; static guint32 global_lbtru_receiver_port_low = LBTRU_DEFAULT_RECEIVER_PORT_LOW; static guint32 global_lbtru_receiver_port_high = LBTRU_DEFAULT_RECEIVER_PORT_HIGH; -static bool global_lbtru_expert_separate_naks = false; -static bool global_lbtru_expert_separate_ncfs = false; -static bool global_lbtru_use_tag = false; -static bool global_lbtru_sequence_analysis = false; +static bool global_lbtru_expert_separate_naks; +static bool global_lbtru_expert_separate_ncfs; +static bool global_lbtru_use_tag; +static bool global_lbtru_sequence_analysis; /* Local preferences variables (used by the dissector). */ static guint32 lbtru_source_port_low = LBTRU_DEFAULT_SOURCE_PORT_LOW; static guint32 lbtru_source_port_high = LBTRU_DEFAULT_SOURCE_PORT_HIGH; static guint32 lbtru_receiver_port_low = LBTRU_DEFAULT_RECEIVER_PORT_LOW; static guint32 lbtru_receiver_port_high = LBTRU_DEFAULT_RECEIVER_PORT_HIGH; -static gboolean lbtru_expert_separate_naks = FALSE; -static gboolean lbtru_expert_separate_ncfs = FALSE; -static gboolean lbtru_use_tag = FALSE; -static gboolean lbtru_sequence_analysis = FALSE; +static gboolean lbtru_expert_separate_naks; +static gboolean lbtru_expert_separate_ncfs; +static gboolean lbtru_use_tag; +static gboolean lbtru_sequence_analysis; /*----------------------------------------------------------------------------*/ /* Tag management. */ @@ -660,8 +660,8 @@ typedef struct guint32 receiver_port_high; } lbtru_tag_entry_t; -static lbtru_tag_entry_t * lbtru_tag_entry = NULL; -static guint lbtru_tag_count = 0; +static lbtru_tag_entry_t * lbtru_tag_entry; +static guint lbtru_tag_count; UAT_CSTRING_CB_DEF(lbtru_tag, name, lbtru_tag_entry_t) UAT_DEC_CB_DEF(lbtru_tag, source_port_low, lbtru_tag_entry_t) diff --git a/epan/dissectors/packet-lbttcp.c b/epan/dissectors/packet-lbttcp.c index f08ee70bed..be8d3b0c96 100644 --- a/epan/dissectors/packet-lbttcp.c +++ b/epan/dissectors/packet-lbttcp.c @@ -266,7 +266,7 @@ static guint32 global_lbttcp_request_port_low = LBTTCP_DEFAULT_REQUEST_PORT_LOW; static guint32 global_lbttcp_request_port_high = LBTTCP_DEFAULT_REQUEST_PORT_HIGH; static guint32 global_lbttcp_store_port_low = LBTTCP_DEFAULT_STORE_PORT_LOW; static guint32 global_lbttcp_store_port_high = LBTTCP_DEFAULT_STORE_PORT_HIGH; -static bool global_lbttcp_use_tag = false; +static bool global_lbttcp_use_tag; /* Local preferences variables (used by the dissector). */ static guint32 lbttcp_source_port_low = LBTTCP_DEFAULT_SOURCE_PORT_LOW; @@ -275,7 +275,7 @@ static guint32 lbttcp_request_port_low = LBTTCP_DEFAULT_REQUEST_PORT_LOW; static guint32 lbttcp_request_port_high = LBTTCP_DEFAULT_REQUEST_PORT_HIGH; static guint32 lbttcp_store_port_low = LBTTCP_DEFAULT_STORE_PORT_LOW; static guint32 lbttcp_store_port_high = LBTTCP_DEFAULT_STORE_PORT_HIGH; -static gboolean lbttcp_use_tag = FALSE; +static gboolean lbttcp_use_tag; /* Tag definitions. */ typedef struct @@ -289,8 +289,8 @@ typedef struct guint32 store_port_high; } lbttcp_tag_entry_t; -static lbttcp_tag_entry_t * lbttcp_tag_entry = NULL; -static guint lbttcp_tag_count = 0; +static lbttcp_tag_entry_t * lbttcp_tag_entry; +static guint lbttcp_tag_count; UAT_CSTRING_CB_DEF(lbttcp_tag, name, lbttcp_tag_entry_t) UAT_DEC_CB_DEF(lbttcp_tag, source_port_low, lbttcp_tag_entry_t) diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index fb03e546d6..5fac871d7b 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -400,13 +400,13 @@ static gint ett_ldap_T_warning; static expert_field ei_ldap_exceeded_filter_length; static expert_field ei_ldap_too_many_filter_elements; -static dissector_table_t ldap_name_dissector_table=NULL; -static const char *object_identifier_id = NULL; /* LDAP OID */ +static dissector_table_t ldap_name_dissector_table; +static const char *object_identifier_id; /* LDAP OID */ -static gboolean do_protocolop = FALSE; -static gchar *attr_type = NULL; -static gboolean is_binary_attr_type = FALSE; -static gboolean ldap_found_in_frame = FALSE; +static gboolean do_protocolop; +static gchar *attr_type; +static gboolean is_binary_attr_type; +static gboolean ldap_found_in_frame; #define TCP_PORT_RANGE_LDAP "389,3268" /* 3268 is Windows 2000 Global Catalog */ #define TCP_PORT_LDAPS 636 @@ -415,7 +415,7 @@ static gboolean ldap_found_in_frame = FALSE; /* desegmentation of LDAP */ static bool ldap_desegment = true; static guint global_ldaps_tcp_port = TCP_PORT_LDAPS; -static guint ssl_port = 0; +static guint ssl_port; static dissector_handle_t gssapi_handle; static dissector_handle_t gssapi_wrap_handle; @@ -824,10 +824,10 @@ static int dissect_mscldap_ntver_flags(proto_tree *parent_tree, tvbuff_t *tvb, i } /* This string contains the last LDAPString that was decoded */ -static const char *attributedesc_string=NULL; +static const char *attributedesc_string; /* This string contains the last AssertionValue that was decoded */ -static char *ldapvalue_string=NULL; +static char *ldapvalue_string; /* if the octet string contain all printable ASCII characters, then * display it as a string, othervise just display it in hex. @@ -933,14 +933,14 @@ finished: } /* This string contains the last Filter item that was decoded */ -static const char *Filter_string=NULL; -static const char *and_filter_string=NULL; -static const char *or_filter_string=NULL; -static const char *substring_value=NULL; -static const char *substring_item_init=NULL; -static const char *substring_item_any=NULL; -static const char *substring_item_final=NULL; -static const char *matching_rule_string=NULL; +static const char *Filter_string; +static const char *and_filter_string; +static const char *or_filter_string; +static const char *substring_value; +static const char *substring_item_init; +static const char *substring_item_any; +static const char *substring_item_final; +static const char *matching_rule_string; static gboolean matching_rule_dnattr=FALSE; #define MAX_FILTER_LEN 4096 @@ -952,8 +952,8 @@ static gint Filter_elements; /* Global variables */ static gint MessageID =-1; static gint ProtocolOp = -1; -static gint result = 0; -static proto_item *ldm_tree = NULL; /* item to add text to */ +static gint result; +static proto_item *ldm_tree; /* item to add text to */ static void ldap_do_protocolop(packet_info *pinfo) { diff --git a/epan/dissectors/packet-lin.c b/epan/dissectors/packet-lin.c index 7c805988be..14be6cb794 100644 --- a/epan/dissectors/packet-lin.c +++ b/epan/dissectors/packet-lin.c @@ -121,10 +121,10 @@ typedef struct _interface_config { #define DATAFILE_LIN_INTERFACE_MAPPING "LIN_interface_mapping" -static GHashTable *data_lin_interfaces_by_id = NULL; -static GHashTable *data_lin_interfaces_by_name = NULL; -static interface_config_t* interface_configs = NULL; -static guint interface_config_num = 0; +static GHashTable *data_lin_interfaces_by_id; +static GHashTable *data_lin_interfaces_by_name; +static interface_config_t* interface_configs; +static guint interface_config_num; UAT_HEX_CB_DEF(interface_configs, interface_id, interface_config_t) UAT_CSTRING_CB_DEF(interface_configs, interface_name, interface_config_t) @@ -291,9 +291,9 @@ typedef struct _sender_receiver_config { #define DATAFILE_LIN_SENDER_RECEIVER "LIN_senders_receivers" -static GHashTable *data_sender_receiver = NULL; -static sender_receiver_config_t* sender_receiver_configs = NULL; -static guint sender_receiver_config_num = 0; +static GHashTable *data_sender_receiver; +static sender_receiver_config_t* sender_receiver_configs; +static guint sender_receiver_config_num; UAT_HEX_CB_DEF(sender_receiver_configs, bus_id, sender_receiver_config_t) UAT_HEX_CB_DEF(sender_receiver_configs, lin_id, sender_receiver_config_t) diff --git a/epan/dissectors/packet-linx.c b/epan/dissectors/packet-linx.c index 3ddcce3f4a..d9fe6b9417 100644 --- a/epan/dissectors/packet-linx.c +++ b/epan/dissectors/packet-linx.c @@ -131,7 +131,7 @@ static int hf_linx_tcp_rlnh_msg_reserved; static int hf_linx_tcp_payload; -static int rlnh_version = 0; +static int rlnh_version; static gint ett_linx; static gint ett_linx_multicore; diff --git a/epan/dissectors/packet-lisp.c b/epan/dissectors/packet-lisp.c index 9f63013daa..fccc4fe9b2 100644 --- a/epan/dissectors/packet-lisp.c +++ b/epan/dissectors/packet-lisp.c @@ -417,8 +417,8 @@ static dissector_handle_t lisp_handle; static dissector_handle_t ipv4_handle; static dissector_handle_t ipv6_handle; -static gboolean encapsulated = FALSE; -static gboolean ddt_originated = FALSE; +static gboolean encapsulated; +static gboolean ddt_originated; static const value_string lisp_typevals[] = { { LISP_MAP_REQUEST, "Map-Request" }, diff --git a/epan/dissectors/packet-lix2.c b/epan/dissectors/packet-lix2.c index cc214d05e8..c5ae576032 100644 --- a/epan/dissectors/packet-lix2.c +++ b/epan/dissectors/packet-lix2.c @@ -32,7 +32,7 @@ void proto_register_lix2(void); /* Initialize the protocol and registered fields */ static int proto_lix2; -static dissector_handle_t lix2_handle = NULL; +static dissector_handle_t lix2_handle; static int hf_lix2_XIRIPayload_PDU; /* XIRIPayload */ diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c index 4e4f2acee1..193d7d0363 100644 --- a/epan/dissectors/packet-llc.c +++ b/epan/dissectors/packet-llc.c @@ -188,7 +188,7 @@ static const value_string type_vals[] = { /* * Hash table for translating OUIs to an oui_info_t. */ -static wmem_map_t *oui_info_table = NULL; +static wmem_map_t *oui_info_table; /* * Decode the SAP value as a bitfield into a string, skipping the GI/CR bit. diff --git a/epan/dissectors/packet-lls-slt.c b/epan/dissectors/packet-lls-slt.c index 4852e89584..8c43e86e66 100644 --- a/epan/dissectors/packet-lls-slt.c +++ b/epan/dissectors/packet-lls-slt.c @@ -25,7 +25,7 @@ /* Saved SLT Table to use it from another protocols (e.g. ALC/LCT) */ -wmem_map_t *lls_slt_table = NULL; +wmem_map_t *lls_slt_table; /* Hash functions */ static gint diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index 9ab5364b37..91be2049cb 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -47,7 +47,7 @@ static int proto_lmp; #define UDP_PORT_LMP_DEFAULT 701 -static bool lmp_checksum_config = false; +static bool lmp_checksum_config; static dissector_handle_t lmp_handle; diff --git a/epan/dissectors/packet-logcat-text.c b/epan/dissectors/packet-logcat-text.c index 4eceb7ff79..9ece2b4211 100644 --- a/epan/dissectors/packet-logcat-text.c +++ b/epan/dissectors/packet-logcat-text.c @@ -46,14 +46,14 @@ static dissector_handle_t logcat_text_long_handle; static gint exported_pdu_tap = -1; -static GRegex *special_regex = NULL; -static GRegex *brief_regex = NULL; -static GRegex *tag_regex = NULL; -static GRegex *time_regex = NULL; -static GRegex *process_regex = NULL; -static GRegex *thread_regex = NULL; -static GRegex *threadtime_regex = NULL; -static GRegex *long_regex = NULL; +static GRegex *special_regex; +static GRegex *brief_regex; +static GRegex *tag_regex; +static GRegex *time_regex; +static GRegex *process_regex; +static GRegex *thread_regex; +static GRegex *threadtime_regex; +static GRegex *long_regex; static const gchar dissector_name[] = "Logcat Text"; diff --git a/epan/dissectors/packet-lorawan.c b/epan/dissectors/packet-lorawan.c index fddcdfeefd..d077155432 100644 --- a/epan/dissectors/packet-lorawan.c +++ b/epan/dissectors/packet-lorawan.c @@ -369,10 +369,10 @@ typedef struct _session_keys_t { GByteArray *appskey; } session_key_t; -static root_key_t *root_keys = NULL; -static session_key_t *session_keys = NULL; -static guint root_num_keys = 0; -static guint session_num_keys = 0; +static root_key_t *root_keys; +static session_key_t *session_keys; +static guint root_num_keys; +static guint session_num_keys; static void byte_array_reverse(GByteArray *arr) diff --git a/epan/dissectors/packet-lpp.c b/epan/dissectors/packet-lpp.c index 84e85d1f2d..77b0a2ad65 100644 --- a/epan/dissectors/packet-lpp.c +++ b/epan/dissectors/packet-lpp.c @@ -2875,7 +2875,7 @@ static int hf_lpp_bdsSvHealth_r12_b2i; static int hf_lpp_bdsSvHealth_r12_nav; static int hf_lpp_AssistanceDataSIBelement_r15_PDU; -static dissector_handle_t lppe_handle = NULL; +static dissector_handle_t lppe_handle; static guint32 lpp_epdu_id = -1; diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index 056540d8c1..17713a993f 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -53,20 +53,20 @@ void proto_register_lte_rrc(void); void proto_reg_handoff_lte_rrc(void); -static dissector_handle_t nas_eps_handle = NULL; -static dissector_handle_t nas_5gs_handle = NULL; -static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL; -static dissector_handle_t rrc_sys_info_cont_handle = NULL; -static dissector_handle_t gsm_a_dtap_handle = NULL; -static dissector_handle_t gsm_rlcmac_dl_handle = NULL; -static dissector_handle_t nr_rrc_reconf_handle = NULL; +static dissector_handle_t nas_eps_handle; +static dissector_handle_t nas_5gs_handle; +static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle; +static dissector_handle_t rrc_sys_info_cont_handle; +static dissector_handle_t gsm_a_dtap_handle; +static dissector_handle_t gsm_rlcmac_dl_handle; +static dissector_handle_t nr_rrc_reconf_handle; static dissector_handle_t lte_rrc_conn_reconf_handle; static dissector_handle_t lte_rrc_dl_ccch_handle; -static wmem_map_t *lte_rrc_etws_cmas_dcs_hash = NULL; +static wmem_map_t *lte_rrc_etws_cmas_dcs_hash; /* Keep track of where/how the System Info value has changed */ -static wmem_map_t *lte_rrc_system_info_value_changed_hash = NULL; +static wmem_map_t *lte_rrc_system_info_value_changed_hash; static guint8 system_info_value_current; static gboolean system_info_value_current_set; diff --git a/epan/dissectors/packet-lwm.c b/epan/dissectors/packet-lwm.c index 23d60b5ee2..c42a518236 100644 --- a/epan/dissectors/packet-lwm.c +++ b/epan/dissectors/packet-lwm.c @@ -84,7 +84,7 @@ void proto_register_lwm(void); void proto_reg_handoff_lwm(void); /* User string with the decryption key. */ -static const gchar *lwmes_key_str = NULL; +static const gchar *lwmes_key_str; static gboolean lwmes_key_valid; static guint8 lwmes_key[16]; diff --git a/epan/dissectors/packet-m3ap.c b/epan/dissectors/packet-m3ap.c index ee7ce32753..7e1527be87 100644 --- a/epan/dissectors/packet-m3ap.c +++ b/epan/dissectors/packet-m3ap.c @@ -39,7 +39,7 @@ void proto_reg_handoff_m3ap(void); /* M3AP uses port 36444 as recommended by IANA. */ #define M3AP_PORT 36444 -static dissector_handle_t m3ap_handle=NULL; +static dissector_handle_t m3ap_handle; #define maxPrivateIEs 65535 #define maxProtocolExtensions 65535 diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index 40b89275bd..25b8fc4062 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -1591,16 +1591,16 @@ static gint global_mac_lte_retx_counter_trigger = 3; static bool global_mac_lte_attempt_rrc_decode = true; /* Whether should attempt to dissect frames failing CRC check */ -static bool global_mac_lte_dissect_crc_failures = false; +static bool global_mac_lte_dissect_crc_failures; /* Whether should attempt to decode lcid 1&2 SDUs as srb1/2 (i.e. AM RLC) */ static bool global_mac_lte_attempt_srb_decode = true; /* Whether should attempt to decode MCH LCID 0 as MCCH */ -static bool global_mac_lte_attempt_mcch_decode = false; +static bool global_mac_lte_attempt_mcch_decode; /* Whether should call RLC dissector to decode MTCH LCIDs */ -static bool global_mac_lte_call_rlc_for_mtch = false; +static bool global_mac_lte_call_rlc_for_mtch; /* Where to take LCID -> DRB mappings from */ enum lcid_drb_source { @@ -1623,17 +1623,17 @@ enum layer_to_show { static gint global_mac_lte_layer_to_show = (gint)ShowRLCLayer; /* Whether to decode Contention Resolution body as UL CCCH */ -static bool global_mac_lte_decode_cr_body = false; +static bool global_mac_lte_decode_cr_body; /* Whether to record config and try to show DRX state for each configured UE */ -static bool global_mac_lte_show_drx = false; +static bool global_mac_lte_show_drx; /* Whether to record config and try to show DRX state for each configured UE */ -static bool global_mac_lte_show_BSR_median = false; +static bool global_mac_lte_show_BSR_median; /* When showing RLC info, count PDUs so can append info column properly */ -static guint8 s_number_of_rlc_pdus_shown = 0; +static guint8 s_number_of_rlc_pdus_shown; /***********************************************************************/ /* How to dissect lcid 3-10 (presume drb logical channels) */ @@ -1705,8 +1705,8 @@ typedef struct lcid_drb_mapping_t { } lcid_drb_mapping_t; /* Mapping entity */ -static lcid_drb_mapping_t *lcid_drb_mappings = NULL; -static guint num_lcid_drb_mappings = 0; +static lcid_drb_mapping_t *lcid_drb_mappings; +static guint num_lcid_drb_mappings; UAT_VS_DEF(lcid_drb_mappings, lcid, lcid_drb_mapping_t, guint16, 3, "LCID 3") UAT_SIGNED_DEC_CB_DEF(lcid_drb_mappings, drbid, lcid_drb_mapping_t) @@ -1729,7 +1729,7 @@ typedef struct ue_dynamic_drb_mappings_t { guint8 drb_to_lcid_mappings[32]; /* Also map drbid -> lcid */ } ue_dynamic_drb_mappings_t; -static GHashTable *mac_lte_ue_channels_hash = NULL; +static GHashTable *mac_lte_ue_channels_hash; extern int proto_rlc_lte; @@ -1751,7 +1751,7 @@ typedef struct Msg3Data { /* This table stores (RNTI -> Msg3Data*). Will be populated when Msg3 frames are first read. */ -static GHashTable *mac_lte_msg3_hash = NULL; +static GHashTable *mac_lte_msg3_hash; typedef enum ContentionResolutionStatus { NoMsg3, @@ -1768,11 +1768,11 @@ typedef struct ContentionResolutionResult { /* This table stores (CRFrameNum -> CRResult). It is assigned during the first pass and used thereafter */ -static GHashTable *mac_lte_cr_result_hash = NULL; +static GHashTable *mac_lte_cr_result_hash; /* This table stores msg3 frame -> CR frame. It is assigned during the first pass * and shown in later passes */ -static GHashTable *mac_lte_msg3_cr_hash = NULL; +static GHashTable *mac_lte_msg3_cr_hash; /**************************************************************************/ @@ -1803,7 +1803,7 @@ typedef struct DLHarqBuffers { /* This table stores (RNTI -> DLHARQBuffers*). Will be populated when DL frames are first read. */ -static GHashTable *mac_lte_dl_harq_hash = NULL; +static GHashTable *mac_lte_dl_harq_hash; typedef struct DLHARQResult { gboolean previousSet, nextSet; @@ -1816,7 +1816,7 @@ typedef struct DLHARQResult { /* This table stores (FrameNumber -> *DLHARQResult). It is assigned during the first pass and used thereafter */ -static GHashTable *mac_lte_dl_harq_result_hash = NULL; +static GHashTable *mac_lte_dl_harq_result_hash; /**************************************************************************/ @@ -1832,7 +1832,7 @@ typedef struct ULHarqBuffers { /* This table stores (RNTI -> ULHarqBuffers*). Will be populated when UL frames are first read. */ -static GHashTable *mac_lte_ul_harq_hash = NULL; +static GHashTable *mac_lte_ul_harq_hash; typedef struct ULHARQResult { gboolean previousSet, nextSet; @@ -1846,7 +1846,7 @@ typedef struct ULHARQResult { /* This table stores (FrameNum -> ULHARQResult). It is assigned during the first pass and used thereafter */ /* TODO: add ueid/rnti to key... */ -static GHashTable *mac_lte_ul_harq_result_hash = NULL; +static GHashTable *mac_lte_ul_harq_result_hash; /**************************************************************************/ @@ -1897,7 +1897,7 @@ typedef struct SRState { /* This table keeps track of the SR state for each UE. (RNTI -> SRState) */ -static GHashTable *mac_lte_ue_sr_state = NULL; +static GHashTable *mac_lte_ue_sr_state; typedef enum SRResultType { @@ -1921,7 +1921,7 @@ typedef struct SRResult { /* Entries in this table are created during the first pass It maps (SRFrameNum -> SRResult) */ -static GHashTable *mac_lte_sr_request_hash = NULL; +static GHashTable *mac_lte_sr_request_hash; /**************************************************************************/ @@ -1969,7 +1969,7 @@ typedef struct ue_parameters_t /* Entries in this table are maintained during the first pass It maps (UEId -> ue_parameters_t). */ -static GHashTable *mac_lte_ue_parameters = NULL; +static GHashTable *mac_lte_ue_parameters; /**************************************************************************/ @@ -1984,7 +1984,7 @@ typedef struct drx_state_key_t { /* Entries in this table are written during the first pass It maps (drx_state_key_t -> drx_state_t), so state at that point may be shown. */ -static GHashTable *mac_lte_drx_frame_result = NULL; +static GHashTable *mac_lte_drx_frame_result; static gint mac_lte_framenum_instance_hash_equal(gconstpointer v, gconstpointer v2) { @@ -2535,7 +2535,7 @@ static void show_drx_info(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, /* Info we might learn from SIB2 to label RAPIDs seen in PRACH and RARs */ -static gboolean s_rapid_ranges_configured = FALSE; +static gboolean s_rapid_ranges_configured; static guint s_rapid_ranges_groupA; static guint s_rapid_ranges_RA; @@ -4301,7 +4301,7 @@ typedef struct TTIInfoResult_t { /* This table stores (FrameNumber -> *TTIInfoResult_t). It is assigned during the first pass and used thereafter */ -static GHashTable *mac_lte_tti_info_result_hash = NULL; +static GHashTable *mac_lte_tti_info_result_hash; /* Work out which UE this is within TTI (within direction). Return answer */ diff --git a/epan/dissectors/packet-mac-nr.c b/epan/dissectors/packet-mac-nr.c index 7df3ccdb2a..033842c733 100644 --- a/epan/dissectors/packet-mac-nr.c +++ b/epan/dissectors/packet-mac-nr.c @@ -437,8 +437,8 @@ typedef struct lcid_drb_mapping_t { } lcid_drb_mapping_t; /* Mapping entity */ -static lcid_drb_mapping_t *lcid_drb_mappings = NULL; -static guint num_lcid_drb_mappings = 0; +static lcid_drb_mapping_t *lcid_drb_mappings; +static guint num_lcid_drb_mappings; UAT_VS_DEF(lcid_drb_mappings, lcid, lcid_drb_mapping_t, guint8, 3, "LCID 3") UAT_DEC_CB_DEF(lcid_drb_mappings, drbid, lcid_drb_mapping_t) @@ -463,13 +463,13 @@ typedef struct ue_dynamic_drb_mappings_t { guint8 drb_to_lcid_mappings[33]; /* Also map drbid (1-32) -> lcid */ } ue_dynamic_drb_mappings_t; -static GHashTable *mac_nr_ue_bearers_hash = NULL; +static GHashTable *mac_nr_ue_bearers_hash; /* When showing RLC info, count PDUs so can append info column properly */ -static guint8 s_number_of_rlc_pdus_shown = 0; +static guint8 s_number_of_rlc_pdus_shown; extern int proto_rlc_nr; diff --git a/epan/dissectors/packet-mausb.c b/epan/dissectors/packet-mausb.c index 05fea0adb3..2b31e720a0 100644 --- a/epan/dissectors/packet-mausb.c +++ b/epan/dissectors/packet-mausb.c @@ -1395,7 +1395,7 @@ void mausb_set_usb_conv_info(usb_conv_info_t *usb_conv_info, /* Used to detect multiple MA Packets in a single TCP packet */ /* Not used for MA Packets in SNAP Packets */ -static gint mausb_num_pdus = 0; +static gint mausb_num_pdus; /* dissect fields common to all MAUSB packet types */ diff --git a/epan/dissectors/packet-mbim.c b/epan/dissectors/packet-mbim.c index 0724b9f7b4..4d9b9f86a8 100644 --- a/epan/dissectors/packet-mbim.c +++ b/epan/dissectors/packet-mbim.c @@ -1120,7 +1120,7 @@ static dissector_handle_t bulk_ndp_ctrl_handle; static dissector_handle_t mbim_control_handle; static dissector_handle_t iso7816_atr_handle; -static bool mbim_control_decode_unknown_itf = false; +static bool mbim_control_decode_unknown_itf; enum { SMS_PDU_AUTOMATIC, @@ -1178,7 +1178,7 @@ static gint preferred_mbim_extended_version = MBIM_Extended_Version_1; static reassembly_table mbim_reassembly_table; -static wmem_map_t *mbim_uuid_ext_hash = NULL; +static wmem_map_t *mbim_uuid_ext_hash; static const fragment_items mbim_frag_items = { &ett_mbim_fragment, diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c index 8a1bbadbb3..7a4dae393c 100644 --- a/epan/dissectors/packet-mbtcp.c +++ b/epan/dissectors/packet-mbtcp.c @@ -174,15 +174,15 @@ static dissector_table_t modbus_dissector_table; /* Globals for Modbus/TCP Preferences */ static bool mbtcp_desegment = true; -static range_t *global_mbus_tcp_ports = NULL; /* Port 502, by default */ -static range_t *global_mbus_udp_ports = NULL; /* Port 502, by default */ -static range_t *global_mbus_tls_ports = NULL; /* Port 802, by default */ +static range_t *global_mbus_tcp_ports; /* Port 502, by default */ +static range_t *global_mbus_udp_ports; /* Port 502, by default */ +static range_t *global_mbus_tls_ports; /* Port 802, by default */ /* Globals for Modbus RTU over TCP Preferences */ static bool mbrtu_desegment = true; static range_t *global_mbus_tcp_rtu_ports = PORT_MBRTU; /* 0, by default */ static range_t *global_mbus_udp_rtu_ports = PORT_MBRTU; /* 0, by default */ -static bool mbrtu_crc = false; +static bool mbrtu_crc; /* Globals for Modbus Preferences */ static gint global_mbus_register_format = MODBUS_PREF_REGISTER_FORMAT_UINT16; diff --git a/epan/dissectors/packet-mcpe.c b/epan/dissectors/packet-mcpe.c index 78a956e890..ff2b1fba7a 100644 --- a/epan/dissectors/packet-mcpe.c +++ b/epan/dissectors/packet-mcpe.c @@ -43,8 +43,8 @@ static gint ett_mcpe_string; /* * Dissectors */ -static dissector_handle_t mcpe_handle = NULL; -static dissector_table_t mcpe_packet_dissectors = NULL; +static dissector_handle_t mcpe_handle; +static dissector_table_t mcpe_packet_dissectors; /* * Expert fields diff --git a/epan/dissectors/packet-mdshdr.c b/epan/dissectors/packet-mdshdr.c index 33bf15cf7b..1abfcd97a7 100644 --- a/epan/dissectors/packet-mdshdr.c +++ b/epan/dissectors/packet-mdshdr.c @@ -88,7 +88,7 @@ static gint ett_mdshdr_trlr; static dissector_handle_t mdshdr_handle; static dissector_handle_t fc_dissector_handle; -static bool decode_if_zero_etype = false; +static bool decode_if_zero_etype; static const value_string sof_vals[] = { {MDSHDR_SOFc1, "SOFc1"}, diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index da80b4a6d3..528a08ae6f 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -467,7 +467,7 @@ static dissector_handle_t h245_handle; static dissector_handle_t h248_handle; static dissector_handle_t h248_otp_handle; -static bool keep_persistent_data = false; +static bool keep_persistent_data; /* * dissect_megaco_text over TCP, there will be a TPKT header there diff --git a/epan/dissectors/packet-metamako.c b/epan/dissectors/packet-metamako.c index a82edc25cb..89da135f16 100644 --- a/epan/dissectors/packet-metamako.c +++ b/epan/dissectors/packet-metamako.c @@ -39,7 +39,7 @@ static bool metamako_check_fcs = true; static gint metamako_fcs_len = -1; /* By default, try to autodetect the FCS. */ /* Heuristic Options */ static gint metamako_trailer_present = -1; /* By default, try to autodetect the trailer. */ -static range_t* metamako_trailer_secs_bounds = NULL; +static range_t* metamako_trailer_secs_bounds; static guint metamako_trailer_days_diff_limit = TRAILER_DAYS_DIFF_LIMIT_DFLT; /* Protocols and Header Fields */ diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index 407420e84f..26516f6389 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -277,8 +277,8 @@ static guint global_mgcp_gateway_tcp_port = TCP_PORT_MGCP_GATEWAY; static guint global_mgcp_gateway_udp_port = UDP_PORT_MGCP_GATEWAY; static guint global_mgcp_callagent_tcp_port = TCP_PORT_MGCP_CALLAGENT; static guint global_mgcp_callagent_udp_port = UDP_PORT_MGCP_CALLAGENT; -static bool global_mgcp_raw_text = false; -static bool global_mgcp_message_count = false; +static bool global_mgcp_raw_text; +static bool global_mgcp_message_count; /* Some basic utility functions that are specific to this dissector */ static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength, const gchar **verb_name); diff --git a/epan/dissectors/packet-mka.c b/epan/dissectors/packet-mka.c index 24866d035b..e7ab83cb55 100644 --- a/epan/dissectors/packet-mka.c +++ b/epan/dissectors/packet-mka.c @@ -192,9 +192,9 @@ typedef struct _mka_ckn_info { gchar *name; } mka_ckn_info_t; -static mka_ckn_info_t *mka_ckn_uat_data = NULL; -static guint num_mka_ckn_uat_data = 0; -static GHashTable *ht_mka_ckn = NULL; +static mka_ckn_info_t *mka_ckn_uat_data; +static guint num_mka_ckn_uat_data; +static GHashTable *ht_mka_ckn; UAT_BUFFER_CB_DEF(mka_ckn_uat_data, ckn, mka_ckn_info_t, key.ckn, key.ckn_len) UAT_CSTRING_CB_DEF(mka_ckn_uat_data, name, mka_ckn_info_t) diff --git a/epan/dissectors/packet-mle.c b/epan/dissectors/packet-mle.c index 652edcaefc..9d2f9ae2d0 100644 --- a/epan/dissectors/packet-mle.c +++ b/epan/dissectors/packet-mle.c @@ -189,7 +189,7 @@ static dissector_handle_t thread_mc_handle; #define UDP_PORT_MLE_RANGE "19788" /* IANA registered */ /* boolean value set if the MIC must be ok before payload is dissected */ -static bool mle_mic_ok = false; +static bool mle_mic_ok; static wmem_tree_t* mle_key_hash_handlers; diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index d9d76f5327..932e7108ce 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -282,7 +282,7 @@ static const fragment_items mp2t_msg_frag_items = { * +-> ts_analysis_data */ -static wmem_map_t *mp2t_stream_hashtable = NULL; +static wmem_map_t *mp2t_stream_hashtable; typedef struct { const conversation_t* conv; diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c index bbd3aa63cf..4a5f05c886 100644 --- a/epan/dissectors/packet-mpeg-dsmcc.c +++ b/epan/dissectors/packet-mpeg-dsmcc.c @@ -62,7 +62,7 @@ static dissector_handle_t dsmcc_ts_handle, dsmcc_tcp_handle, dsmcc_udp_handle; static int proto_dsmcc; -static bool dsmcc_sect_check_crc = false; +static bool dsmcc_sect_check_crc; /* NOTE: Please add values numerically according to 13818-6 so it is easier to * keep track of what parameters/tables are associated with each other. diff --git a/epan/dissectors/packet-mpeg-sect.c b/epan/dissectors/packet-mpeg-sect.c index da70c2acc4..b5f3aa2d3b 100644 --- a/epan/dissectors/packet-mpeg-sect.c +++ b/epan/dissectors/packet-mpeg-sect.c @@ -35,7 +35,7 @@ static expert_field ei_mpeg_sect_crc; static dissector_table_t mpeg_sect_tid_dissector_table; -static bool mpeg_sect_check_crc = false; +static bool mpeg_sect_check_crc; /* minimum length of the entire section == bytes from table_id to section_length == 3 bytes */ diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c index bdf28bdad5..5e0cdd951d 100644 --- a/epan/dissectors/packet-mpls.c +++ b/epan/dissectors/packet-mpls.c @@ -95,7 +95,7 @@ static dissector_handle_t mpls_pwcw_handle; static dissector_handle_t mpls_mcc_handle; /* For RFC6391 - Flow aware transport of pseudowire over a mpls PSN*/ -static bool mpls_bos_flowlabel = false; +static bool mpls_bos_flowlabel; static int hf_mpls_label; static int hf_mpls_label_special; diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index 607e5dc3e5..757ab9e00b 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -1016,7 +1016,7 @@ static heur_dissector_list_t mq_heur_subdissector_list; static bool mq_desegment = true; static bool mq_reassembly = true; -static gboolean mq_in_reassembly = FALSE; +static gboolean mq_in_reassembly; static reassembly_table mq_reassembly_table; diff --git a/epan/dissectors/packet-ms-do.c b/epan/dissectors/packet-ms-do.c index a0e172ed7f..8cf64f9f1b 100644 --- a/epan/dissectors/packet-ms-do.c +++ b/epan/dissectors/packet-ms-do.c @@ -73,7 +73,7 @@ static gint ett_do_bitfield_single; static expert_field ei_do_invalid_message_id; static expert_field ei_do_invalid_message_length; -static dissector_handle_t do_handle = NULL; +static dissector_handle_t do_handle; #define DO_PORT (7680) diff --git a/epan/dissectors/packet-mtp2.c b/epan/dissectors/packet-mtp2.c index 6a32368007..2f3da4f332 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -162,7 +162,7 @@ static const fragment_items mtp2_frag_items = { static reassembly_table mtp2_reassembly_table; /* variables needed for property registration to wireshark menu */ -static bool reverse_bit_order_mtp2 = false; +static bool reverse_bit_order_mtp2; static expert_field ei_mtp2_checksum_error; static expert_field ei_mtp2_li_bad; @@ -170,15 +170,15 @@ static expert_field ei_mtp2_li_bad; /* Initialize the subtree pointers */ static gint ett_mtp2; -static bool use_extended_sequence_numbers_default = false; -static bool capture_contains_fcs_crc_default = false; +static bool use_extended_sequence_numbers_default; +static bool capture_contains_fcs_crc_default; /* sequence number of the actual packet to be reassembled * this is needed because the reassemble handler uses a key based on the * source and destination IP addresses * therefore if there are multiple streams between 2 IP end-points * the reassemble sequence numbers can conflict if they are based on conversations */ -static guint32 mtp2_absolute_reass_seq_num = 0; +static guint32 mtp2_absolute_reass_seq_num; #define BSN_BIB_LENGTH 1 #define FSN_FIB_LENGTH 1 diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c index b28ec14db2..b1af33b689 100644 --- a/epan/dissectors/packet-mtp3.c +++ b/epan/dissectors/packet-mtp3.c @@ -112,7 +112,7 @@ static gint japan_pc_structure = JAPAN_PC_STRUCTURE_NONE; #include "packet-mtp3.h" gint mtp3_standard = ITU_STANDARD; -bool mtp3_heuristic_standard = false; +bool mtp3_heuristic_standard; static gint pref_mtp3_standard; @@ -124,9 +124,9 @@ const value_string mtp3_standard_vals[] = { { 0, NULL } }; -static bool mtp3_use_ansi_5_bit_sls = false; -static bool mtp3_use_japan_5_bit_sls = false; -static bool mtp3_show_itu_priority = false; +static bool mtp3_use_ansi_5_bit_sls; +static bool mtp3_use_japan_5_bit_sls; +static bool mtp3_show_itu_priority; static gint mtp3_addr_fmt = MTP3_ADDR_FMT_DASHED; #define SIO_LENGTH 1 diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c index 1527e027b2..cdf582928f 100644 --- a/epan/dissectors/packet-multipart.c +++ b/epan/dissectors/packet-multipart.c @@ -130,8 +130,8 @@ static dissector_handle_t gssapi_handle; * as raw text, may cause problems with images sound etc * TODO improve to check for different content types ? */ -static bool display_unknown_body_as_text = false; -static bool remove_base64_encoding = false; +static bool display_unknown_body_as_text; +static bool remove_base64_encoding; #ifdef HAVE_ZLIB static bool uncompress_data = true; #endif diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index 25933a1c91..ddafbbe4c0 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -955,7 +955,7 @@ static int proto_mysql; /* dissector configuration */ static bool mysql_desegment = true; -static bool mysql_showquery = false; +static bool mysql_showquery; /* expand-the-tree flags */ static gint ett_mysql; diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c index b7639853cd..5656af910f 100644 --- a/epan/dissectors/packet-nas_5gs.c +++ b/epan/dissectors/packet-nas_5gs.c @@ -34,7 +34,7 @@ void proto_register_nas_5gs(void); void proto_reg_handoff_nas_5gs(void); -static bool g_nas_5gs_null_decipher = false; +static bool g_nas_5gs_null_decipher; enum { DECODE_USER_DATA_AS_NONE, DECODE_USER_DATA_AS_IP, diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index 56cc2f8b03..a3646e5e14 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -450,7 +450,7 @@ static expert_field ei_nas_eps_sec_hdr_wrong_pd; static expert_field ei_nas_eps_missing_mandatory_elemen; /* Global variables */ -static bool g_nas_eps_dissect_plain = false; +static bool g_nas_eps_dissect_plain; static bool g_nas_eps_null_decipher = true; enum { DECODE_USER_DATA_AS_NONE, diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index a8140d0560..1586421ed1 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -6666,9 +6666,9 @@ static void nbap_reset_private_data(packet_info *pinfo) /* Variables for sub elements dissection */ static const gchar *ProcedureID; /* Trees */ -static wmem_tree_t* edch_flow_port_map = NULL; -wmem_tree_t *nbap_scrambling_code_crncc_map = NULL; -wmem_tree_t *nbap_crncc_urnti_map = NULL; +static wmem_tree_t* edch_flow_port_map; +wmem_tree_t *nbap_scrambling_code_crncc_map; +wmem_tree_t *nbap_crncc_urnti_map; static wmem_tree_t* com_context_map; /* This table is used externally from FP, MAC and such, TODO: merge this with diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index cda055408a..d4df35948c 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -673,7 +673,7 @@ typedef struct { guint32 session_start_packet_num; } mncp_rhash_value; -static GHashTable *mncp_rhash = NULL; +static GHashTable *mncp_rhash; /* Hash Functions */ static gint diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index d9d5d8fac7..d2aa9d6ef6 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -29,9 +29,9 @@ bool nds_defragment = true; bool nds_echo_eid = true; bool ncp_echo_err = true; -bool ncp_echo_conn = false; +bool ncp_echo_conn; bool ncp_echo_server = true; -bool ncp_echo_file = false; +bool ncp_echo_file; bool ncp_newstyle = true; extern dissector_handle_t nds_data_handle; @@ -2039,8 +2039,8 @@ typedef struct { char object_name[256]; } ncp_req_eid_hash_value; -static wmem_map_t *ncp_req_hash = NULL; -static wmem_map_t *ncp_req_eid_hash = NULL; +static wmem_map_t *ncp_req_hash; +static wmem_map_t *ncp_req_eid_hash; static uint32_t check_offset_addition(uint32_t offset, uint32_t value, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb) { @@ -7080,7 +7080,7 @@ nds_defrag(tvbuff_t *tvb, packet_info *pinfo, uint32_t nw_connection, uint8_t se } } -static bool ncp2222_dfilters_compiled = false; +static bool ncp2222_dfilters_compiled; static void ncp2222_compile_dfilters(void) diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 56efc4707c..54b35fdf4a 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -318,7 +318,7 @@ typedef struct _ndmp_conv_data_t { ndmp_task_data_t *task; conversation_t *conversation; } ndmp_conv_data_t; -static ndmp_conv_data_t *ndmp_conv_data=NULL; +static ndmp_conv_data_t *ndmp_conv_data; static proto_tree *top_tree; static itl_nexus_t * diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index ec49127740..fdddae7759 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -45,7 +45,7 @@ static guint32 tid = 1; static bool ndps_show_oids=FALSE; /* Global Attribute for evaluation of Values */ -static const char *global_attribute_name=NULL; +static const char *global_attribute_name; static int dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, guint32, guint32, int); @@ -4025,7 +4025,7 @@ typedef struct { guint32 ndps_end_frag; } ndps_req_hash_value; -static wmem_map_t *ndps_req_hash = NULL; +static wmem_map_t *ndps_req_hash; /* Hash Functions */ static gint diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c index 718e48b046..82266905d4 100644 --- a/epan/dissectors/packet-netflow.c +++ b/epan/dissectors/packet-netflow.c @@ -170,15 +170,15 @@ static dissector_handle_t eth_handle; /* * global_netflow_ports : holds the configured range of ports for netflow */ -static range_t *global_netflow_ports = NULL; +static range_t *global_netflow_ports; /* * global_ipfix_ports : holds the configured range of ports for IPFIX */ -static range_t *global_ipfix_ports = NULL; +static range_t *global_ipfix_ports; static bool netflow_preference_desegment = true; -static bool netflow_preference_tcpflags_1byte_cwr = false; +static bool netflow_preference_tcpflags_1byte_cwr; /* * Flowset (template) ID's @@ -332,7 +332,7 @@ typedef struct _v9_v10_tmplt { /* Map from (converstion+obs-domain-id+flowset-id) -> v9_v10_tmplt_entry_t* */ /* Confusingly, for key, fill in only relevant parts of v9_v10_tmplt_entry_t... */ -wmem_map_t *v9_v10_tmplt_table = NULL; +wmem_map_t *v9_v10_tmplt_table; static const value_string v9_v10_template_types[] = { diff --git a/epan/dissectors/packet-netperfmeter.c b/epan/dissectors/packet-netperfmeter.c index 6e76f8478c..38af0747cd 100644 --- a/epan/dissectors/packet-netperfmeter.c +++ b/epan/dissectors/packet-netperfmeter.c @@ -35,8 +35,8 @@ static int ett_data_flags; static int ett_results_flags; static int ett_onoffarray; -static guint64 npm_total_msgs = 0; -static guint64 npm_total_bytes = 0; +static guint64 npm_total_msgs; +static guint64 npm_total_bytes; #define PPID_NETPERFMETER_CONTROL_LEGACY 0x29097605 diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 121eb67d11..7cd252e227 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -1016,13 +1016,13 @@ typedef struct nfs_fhandle_data { /* fhandle displayfilters to match also corresponding request/response packet in addition to the one containing the actual filehandle */ -bool nfs_fhandle_reqrep_matching = false; -static wmem_tree_t *nfs_fhandle_frame_table = NULL; +bool nfs_fhandle_reqrep_matching; +static wmem_tree_t *nfs_fhandle_frame_table; /* file name snooping */ -bool nfs_file_name_snooping = false; -static bool nfs_file_name_full_snooping = false; +bool nfs_file_name_snooping; +static bool nfs_file_name_full_snooping; typedef struct nfs_name_snoop { int fh_length; unsigned char *fh; @@ -1041,12 +1041,12 @@ typedef struct nfs_name_snoop_key { const unsigned char *fh; } nfs_name_snoop_key_t; -static GHashTable *nfs_name_snoop_unmatched = NULL; +static GHashTable *nfs_name_snoop_unmatched; -static GHashTable *nfs_name_snoop_matched = NULL; +static GHashTable *nfs_name_snoop_matched; -static wmem_tree_t *nfs_name_snoop_known = NULL; -static wmem_tree_t *nfs_file_handles = NULL; +static wmem_tree_t *nfs_name_snoop_known; +static wmem_tree_t *nfs_file_handles; static bool nfs_display_v4_tag = true; static bool display_major_nfs4_ops = true; diff --git a/epan/dissectors/packet-ngap.c b/epan/dissectors/packet-ngap.c index 71335e8093..a81440a655 100644 --- a/epan/dissectors/packet-ngap.c +++ b/epan/dissectors/packet-ngap.c @@ -3280,7 +3280,7 @@ static const enum_val_t ngap_lte_container_vals[] = { }; /* Global variables */ -static range_t *gbl_ngapSctpRange = NULL; +static range_t *gbl_ngapSctpRange; static bool ngap_dissect_container = true; static gint ngap_dissect_target_ng_ran_container_as = NGAP_NG_RAN_CONTAINER_AUTOMATIC; static gint ngap_dissect_lte_container_as = NGAP_LTE_CONTAINER_AUTOMATIC; @@ -3295,7 +3295,7 @@ static dissector_table_t ngap_proc_sout_dissector_table; static dissector_table_t ngap_proc_uout_dissector_table; static dissector_table_t ngap_n2_ie_type_dissector_table; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static void set_message_label(asn1_ctx_t *actx, int type) { diff --git a/epan/dissectors/packet-nlm.c b/epan/dissectors/packet-nlm.c index 06573a76c8..1bd0ee23a1 100644 --- a/epan/dissectors/packet-nlm.c +++ b/epan/dissectors/packet-nlm.c @@ -79,9 +79,9 @@ static gint ett_nlm_lock; * stuff to match MSG and RES packets for async NLM */ -static bool nlm_match_msgres = false; -static wmem_map_t *nlm_msg_res_unmatched = NULL; -static wmem_map_t *nlm_msg_res_matched = NULL; +static bool nlm_match_msgres; +static wmem_map_t *nlm_msg_res_unmatched; +static wmem_map_t *nlm_msg_res_matched; /* XXX when matching the packets we should really check the conversation (only address NOT ports) and command type as well. I am lazy and thinks the cookie itself is diff --git a/epan/dissectors/packet-nordic_ble.c b/epan/dissectors/packet-nordic_ble.c index 1c0a9028c7..639f8eb00b 100644 --- a/epan/dissectors/packet-nordic_ble.c +++ b/epan/dissectors/packet-nordic_ble.c @@ -294,8 +294,8 @@ typedef struct { } nordic_ble_context_t; /* next dissector */ -static dissector_handle_t btle_dissector_handle = NULL; -static dissector_handle_t debug_handle = NULL; +static dissector_handle_t btle_dissector_handle; +static dissector_handle_t debug_handle; static gint dissect_lengths(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, nordic_ble_context_t *nordic_ble_context) diff --git a/epan/dissectors/packet-nr-rrc.c b/epan/dissectors/packet-nr-rrc.c index 18156eef16..9cfbb8ec47 100644 --- a/epan/dissectors/packet-nr-rrc.c +++ b/epan/dissectors/packet-nr-rrc.c @@ -51,13 +51,13 @@ void proto_register_nr_rrc(void); void proto_reg_handoff_nr_rrc(void); -static dissector_handle_t nas_5gs_handle = NULL; -static dissector_handle_t lte_rrc_conn_reconf_handle = NULL; -static dissector_handle_t lte_rrc_conn_reconf_compl_handle = NULL; -static dissector_handle_t lte_rrc_ul_dcch_handle = NULL; -static dissector_handle_t lte_rrc_dl_dcch_handle = NULL; +static dissector_handle_t nas_5gs_handle; +static dissector_handle_t lte_rrc_conn_reconf_handle; +static dissector_handle_t lte_rrc_conn_reconf_compl_handle; +static dissector_handle_t lte_rrc_ul_dcch_handle; +static dissector_handle_t lte_rrc_dl_dcch_handle; -static wmem_map_t *nr_rrc_etws_cmas_dcs_hash = NULL; +static wmem_map_t *nr_rrc_etws_cmas_dcs_hash; static reassembly_table nr_rrc_sib7_reassembly_table; static reassembly_table nr_rrc_sib8_reassembly_table; diff --git a/epan/dissectors/packet-nsip.c b/epan/dissectors/packet-nsip.c index 4fee1966a2..6b39f73466 100644 --- a/epan/dissectors/packet-nsip.c +++ b/epan/dissectors/packet-nsip.c @@ -222,7 +222,7 @@ static const value_string ip_address_type_vals[] = { static dissector_handle_t bssgp_handle; static dissector_handle_t nsip_handle; -static gboolean nsip_is_recursive = FALSE; +static gboolean nsip_is_recursive; typedef struct { guint8 iei; diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index c825a4275f..9bde31e6ad 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -78,7 +78,7 @@ static const value_string ntlmssp_message_types[] = { (ek->fd_num == -1 && ek->keytype == 23 && ek->keylength == NTLMSSP_KEY_LEN) static const unsigned char gbl_zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -static GHashTable* hash_packet = NULL; +static GHashTable* hash_packet; /* * NTLMSSP negotiation flags @@ -288,7 +288,7 @@ static expert_field ei_ntlmssp_sessionkey; static dissector_handle_t ntlmssp_handle, ntlmssp_wrap_handle; /* Configuration variables */ -static const char *ntlmssp_option_nt_password = NULL; +static const char *ntlmssp_option_nt_password; #define NTLMSSP_CONV_INFO_KEY 0 /* Used in the conversation function */ diff --git a/epan/dissectors/packet-nvme-tcp.c b/epan/dissectors/packet-nvme-tcp.c index a77499e818..45a6e0e7b9 100644 --- a/epan/dissectors/packet-nvme-tcp.c +++ b/epan/dissectors/packet-nvme-tcp.c @@ -56,8 +56,8 @@ static dissector_handle_t nvmet_tls_handle; #define NVME_TCP_HEADER_SIZE 8 #define PDU_LEN_OFFSET_FROM_HEADER 4 static range_t *gPORT_RANGE; -static bool nvme_tcp_check_hdgst = false; -static bool nvme_tcp_check_ddgst = false; +static bool nvme_tcp_check_hdgst; +static bool nvme_tcp_check_ddgst; #define NVME_TCP_DATA_PDU_SIZE 24 enum nvme_tcp_pdu_type { diff --git a/epan/dissectors/packet-obex.c b/epan/dissectors/packet-obex.c index 86f1dc992a..89788a8185 100644 --- a/epan/dissectors/packet-obex.c +++ b/epan/dissectors/packet-obex.c @@ -392,9 +392,9 @@ static gint ett_obex_session_parameters; static gint ett_obex_application_parameters; static gint ett_obex_authentication_parameters; -static wmem_tree_t *obex_path = NULL; -static wmem_tree_t *obex_profile = NULL; -static wmem_tree_t *obex_last_opcode = NULL; +static wmem_tree_t *obex_path; +static wmem_tree_t *obex_profile; +static wmem_tree_t *obex_last_opcode; static dissector_handle_t http_handle; static dissector_handle_t xml_handle; diff --git a/epan/dissectors/packet-ocp1.c b/epan/dissectors/packet-ocp1.c index 48fbece6ba..d4f4b8f44c 100644 --- a/epan/dissectors/packet-ocp1.c +++ b/epan/dissectors/packet-ocp1.c @@ -52,7 +52,7 @@ struct oca_request_hash_val { guint16 tree_level; guint16 method_index; }; -static wmem_map_t *oca_request_hash_map = NULL; +static wmem_map_t *oca_request_hash_map; void proto_register_ocp1(void); void proto_reg_handoff_ocp1(void); diff --git a/epan/dissectors/packet-oer.c b/epan/dissectors/packet-oer.c index cccd83e84f..a4bf449d78 100644 --- a/epan/dissectors/packet-oer.c +++ b/epan/dissectors/packet-oer.c @@ -50,7 +50,7 @@ static expert_field ei_oer_undecoded; static expert_field ei_oer_open_type; /* whether the OER helpers should put the internal OER fields into the tree or not. */ -static bool display_internal_oer_fields = false; +static bool display_internal_oer_fields; /* #define DEBUG_ENTRY(x) \ diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c index c0acfe04c7..7e8d21495d 100644 --- a/epan/dissectors/packet-omron-fins.c +++ b/epan/dissectors/packet-omron-fins.c @@ -60,7 +60,7 @@ static gint ett_omron_netw_nodes_cyclic_err_ctrs; static gint ett_omron_data_link_status_tree; #if 0 -static bool gPREF_HEX = false; +static bool gPREF_HEX; #endif /* TCP Header fields */ diff --git a/epan/dissectors/packet-opa-fe.c b/epan/dissectors/packet-opa-fe.c index edd2967f3e..a1b9bd9722 100644 --- a/epan/dissectors/packet-opa-fe.c +++ b/epan/dissectors/packet-opa-fe.c @@ -42,9 +42,9 @@ static gint hf_opa_fe_Reserved64; static dissector_handle_t opa_fe_handle; static dissector_handle_t opa_mad_handle; -static range_t *global_fe_ssl_range = NULL; +static range_t *global_fe_ssl_range; -static range_t *fe_ssl_range = NULL; +static range_t *fe_ssl_range; static guint get_opa_fe_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { diff --git a/epan/dissectors/packet-opa-mad.c b/epan/dissectors/packet-opa-mad.c index 74fa500c9e..7b07ff9644 100644 --- a/epan/dissectors/packet-opa-mad.c +++ b/epan/dissectors/packet-opa-mad.c @@ -2696,14 +2696,14 @@ static dissector_table_t ethertype_dissector_table; static reassembly_table opa_mad_rmpp_reassembly_table; -static bool pref_parse_on_mad_status_error = false; +static bool pref_parse_on_mad_status_error; static bool pref_attempt_rmpp_defragment = true; -static range_t *global_mad_vendor_class = NULL; -static range_t *global_mad_vendor_rmpp_class = NULL; -static range_t *global_mad_application_class = NULL; -static range_t *global_mad_reserved_class = NULL; -static range_t *global_mad_opa_class = NULL; +static range_t *global_mad_vendor_class; +static range_t *global_mad_vendor_rmpp_class; +static range_t *global_mad_application_class; +static range_t *global_mad_reserved_class; +static range_t *global_mad_opa_class; static gint parse_MAD_AttributeModifier(proto_tree *MAD_tree, tvbuff_t *tvb, gint *offset, MAD_t *MAD) { diff --git a/epan/dissectors/packet-openflow.c b/epan/dissectors/packet-openflow.c index b6be6ab6ce..896a558c77 100644 --- a/epan/dissectors/packet-openflow.c +++ b/epan/dissectors/packet-openflow.c @@ -26,7 +26,7 @@ void proto_reg_handoff_openflow(void); #define OFP_LEGACY_PORT 6633 #define OFP_LEGACY2_PORT 6634 #define OFP_IANA_PORT 6653 -static range_t *g_openflow_ports = NULL; +static range_t *g_openflow_ports; static dissector_handle_t openflow_handle; static dissector_handle_t openflow_v1_handle; diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index 4cf784cecc..bd17b0ceb9 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -220,7 +220,7 @@ static gint ett_opensafety_ssdo_fragment; static gint ett_opensafety_ssdo_fragments; /* Definitions for the openSAFETY ov. UDP transport protocol */ -static dissector_handle_t opensafety_udptransport_handle = NULL; +static dissector_handle_t opensafety_udptransport_handle; static int proto_oss_udp_transport; @@ -263,16 +263,16 @@ static const fragment_items oss_frag_items = { static const char *global_scm_udid = "00:00:00:00:00:00"; -static dissector_handle_t data_dissector = NULL; -static dissector_handle_t opensafety_udpdata_handle = NULL; -static dissector_handle_t opensafety_mbtcp_handle = NULL; -static dissector_handle_t opensafety_pnio_handle = NULL; +static dissector_handle_t data_dissector; +static dissector_handle_t opensafety_udpdata_handle; +static dissector_handle_t opensafety_mbtcp_handle; +static dissector_handle_t opensafety_pnio_handle; -static bool global_display_intergap_data = false; +static bool global_display_intergap_data; static bool global_scm_udid_autoset = true; -static bool global_udp_frame2_first = false; -static bool global_siii_udp_frame2_first = false; -static bool global_mbtcp_big_endian = false; +static bool global_udp_frame2_first; +static bool global_siii_udp_frame2_first; +static bool global_mbtcp_big_endian; static guint global_network_udp_port = OPENSAFETY_UDP_PORT; static guint global_network_udp_port_sercosiii = OPENSAFETY_UDP_PORT_SIII; static bool global_classify_transport = true; @@ -280,20 +280,20 @@ static bool global_classify_transport = true; static bool global_enable_udp = true; static bool global_enable_mbtcp = true; -static bool global_opensafety_debug_verbose = false; +static bool global_opensafety_debug_verbose; static const char * global_filter_nodes = ""; static bool global_show_only_node_in_filter = true; -static wmem_list_t * global_filter_list = NULL; +static wmem_list_t * global_filter_list; static gboolean heuristic_siii_dissection_enabled = TRUE; static heur_dissector_list_t heur_opensafety_spdo_subdissector_list; -static gboolean bDissector_Called_Once_Before = FALSE; +static gboolean bDissector_Called_Once_Before; /* Using local_scm_udid as read variable for global_scm_udid, to * enable automatic detection of scm udid */ -static char *local_scm_udid = NULL; +static char *local_scm_udid; static reassembly_table os_reassembly_table; diff --git a/epan/dissectors/packet-openvpn.c b/epan/dissectors/packet-openvpn.c index a12ec48021..2e3c0610ec 100644 --- a/epan/dissectors/packet-openvpn.c +++ b/epan/dissectors/packet-openvpn.c @@ -81,9 +81,9 @@ static dissector_handle_t tls_handle; /* Preferences */ static bool pref_long_format = true; -static bool pref_tls_auth = false; -static bool pref_tls_auth_override = false; -static bool pref_tls_crypt_override = false; +static bool pref_tls_auth; +static bool pref_tls_auth_override; +static bool pref_tls_crypt_override; static guint tls_auth_hmac_size = 20; /* Default SHA-1 160 Bits */ static const value_string openvpn_message_types[] = diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c index 8dd8663067..2f84844e3f 100644 --- a/epan/dissectors/packet-openwire.c +++ b/epan/dissectors/packet-openwire.c @@ -268,7 +268,7 @@ static expert_field ei_openwire_body_type_not_supported; static dissector_handle_t openwire_tcp_handle; static bool openwire_desegment = true; -static bool openwire_verbose_type = false; +static bool openwire_verbose_type; #define OPENWIRE_PORT_TCP 61616 diff --git a/epan/dissectors/packet-oran.c b/epan/dissectors/packet-oran.c index 7f0d224289..5e5aa714b0 100644 --- a/epan/dissectors/packet-oran.c +++ b/epan/dissectors/packet-oran.c @@ -291,8 +291,8 @@ static guint pref_sample_bit_width_downlink = 14; static gint pref_iqCompressionUplink = COMP_BLOCK_FP; static gint pref_iqCompressionDownlink = COMP_BLOCK_FP; -static bool pref_includeUdCompHeaderUplink = false; -static bool pref_includeUdCompHeaderDownlink = false; +static bool pref_includeUdCompHeaderUplink; +static bool pref_includeUdCompHeaderDownlink; static guint pref_data_plane_section_total_rbs = 273; static guint pref_num_weights_per_bundle = 32; @@ -817,7 +817,7 @@ typedef struct { } flow_state_t; /* Table maintained on first pass from eAxC (guint16) -> flow_state_t* */ -static wmem_tree_t *flow_states_table = NULL; +static wmem_tree_t *flow_states_table; diff --git a/epan/dissectors/packet-osc.c b/epan/dissectors/packet-osc.c index 548929209b..7de395522c 100644 --- a/epan/dissectors/packet-osc.c +++ b/epan/dissectors/packet-osc.c @@ -295,8 +295,8 @@ static const char *immediate_str = "Immediate"; static const char *bundle_str = "#bundle"; /* Initialize the protocol and registered fields */ -static dissector_handle_t osc_udp_handle = NULL; -static dissector_handle_t osc_tcp_handle = NULL; +static dissector_handle_t osc_udp_handle; +static dissector_handle_t osc_tcp_handle; static int proto_osc; diff --git a/epan/dissectors/packet-oscore.c b/epan/dissectors/packet-oscore.c index 889b5c93b2..cdc5884a84 100644 --- a/epan/dissectors/packet-oscore.c +++ b/epan/dissectors/packet-oscore.c @@ -66,9 +66,9 @@ static expert_field ei_oscore_info_fetch_failed; static gint ett_oscore; /* UAT variables */ -static uat_t *oscore_context_uat = NULL; -static oscore_context_t *oscore_contexts = NULL; -static guint num_oscore_contexts = 0; +static uat_t *oscore_context_uat; +static oscore_context_t *oscore_contexts; +static guint num_oscore_contexts; /* Enumeration for COSE algorithms used by OSCORE */ static const value_string oscore_context_alg_vals[] = { diff --git a/epan/dissectors/packet-osi.c b/epan/dissectors/packet-osi.c index 6c2783e57c..5cfdd91fb3 100644 --- a/epan/dissectors/packet-osi.c +++ b/epan/dissectors/packet-osi.c @@ -39,7 +39,7 @@ static dissector_handle_t osi_juniper_handle; /* Preferences for OSI over TPKT over TCP */ -static bool tpkt_desegment = false; +static bool tpkt_desegment; gboolean osi_calc_checksum( tvbuff_t *tvb, int offset, guint len, guint32* c0, guint32* c1) { diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c index 62ee47ec54..e05f66f5bf 100644 --- a/epan/dissectors/packet-ositp.c +++ b/epan/dissectors/packet-ositp.c @@ -338,9 +338,9 @@ static heur_dissector_list_t cltp_heur_subdissector_list; * Reassembly of COTP. */ static reassembly_table cotp_reassembly_table; -static guint16 cotp_dst_ref = 0; -static gboolean cotp_frame_reset = FALSE; -static gboolean cotp_last_fragment = FALSE; +static guint16 cotp_dst_ref; +static gboolean cotp_frame_reset; +static gboolean cotp_last_fragment; #define TSAP_DISPLAY_AUTO 0 #define TSAP_DISPLAY_STRING 1 @@ -349,7 +349,7 @@ static gboolean cotp_last_fragment = FALSE; /* options */ static bool cotp_reassemble = true; static gint32 tsap_display = TSAP_DISPLAY_AUTO; -static bool cotp_decode_atn = false; +static bool cotp_decode_atn; static const enum_val_t tsap_display_options[] = { {"auto", "As strings if printable", TSAP_DISPLAY_AUTO}, diff --git a/epan/dissectors/packet-p7.c b/epan/dissectors/packet-p7.c index 7cfe690c2d..e0f6c11ccc 100644 --- a/epan/dissectors/packet-p7.c +++ b/epan/dissectors/packet-p7.c @@ -38,7 +38,7 @@ void proto_register_p7(void); void proto_reg_handoff_p7(void); -static int seqno = 0; +static int seqno; /* Initialize the protocol and registered fields */ static int proto_p7; diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c index 878c0a3b07..b92cffa8f2 100644 --- a/epan/dissectors/packet-p_mul.c +++ b/epan/dissectors/packet-p_mul.c @@ -167,7 +167,7 @@ static expert_field ei_message_discarded; static expert_field ei_ack_length; static expert_field ei_analysis_retrans_no; -static dissector_handle_t p_mul_handle = NULL; +static dissector_handle_t p_mul_handle; typedef struct _p_mul_id_key { guint32 id; @@ -197,7 +197,7 @@ typedef struct _p_mul_ack_data { } p_mul_ack_data; /* Hash table with current data for seq/ack analysis */ -static wmem_map_t *p_mul_id_hash_table = NULL; +static wmem_map_t *p_mul_id_hash_table; /* User definable values to use for dissection */ static bool p_mul_reassemble = true; @@ -207,7 +207,7 @@ static bool use_seq_ack_analysis = true; static reassembly_table p_mul_reassembly_table; -static guint32 message_id_offset = 0; +static guint32 message_id_offset; static const fragment_items p_mul_frag_items = { /* Fragment subtrees */ diff --git a/epan/dissectors/packet-pcap.c b/epan/dissectors/packet-pcap.c index 98fb32e8b1..6a3f417efe 100644 --- a/epan/dissectors/packet-pcap.c +++ b/epan/dissectors/packet-pcap.c @@ -249,7 +249,7 @@ typedef enum _ProtocolIE_ID_enum { id_AddPosSupport = 142 } ProtocolIE_ID_enum; -static dissector_handle_t pcap_handle = NULL; +static dissector_handle_t pcap_handle; /* Initialize the protocol and registered fields */ static int proto_pcap; diff --git a/epan/dissectors/packet-pcomtcp.c b/epan/dissectors/packet-pcomtcp.c index 60985259ae..b11e2e0fa1 100644 --- a/epan/dissectors/packet-pcomtcp.c +++ b/epan/dissectors/packet-pcomtcp.c @@ -81,7 +81,7 @@ static dissector_handle_t pcombinary_handle; #define PCOM_ASCII 101 #define PCOM_BINARY 102 -static range_t *global_pcomtcp_tcp_ports = NULL; /* Port 20256, by default */ +static range_t *global_pcomtcp_tcp_ports; /* Port 20256, by default */ /* Translate pcomp_protocol to string */ static const value_string pcomp_protocol_vals[] = { diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index ce1844740b..985eb4a2b1 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -171,11 +171,11 @@ typedef struct { } uat_ue_keys_record_t; /* N.B. this is an array/table of the struct above, where ueid is the key */ -static uat_ue_keys_record_t *uat_ue_keys_records = NULL; +static uat_ue_keys_record_t *uat_ue_keys_records; /* Entries added by UAT */ -static uat_t * ue_keys_uat = NULL; -static guint num_ue_keys_uat = 0; +static uat_t * ue_keys_uat; +static guint num_ue_keys_uat; /* Convert an ascii hex character into a digit. Should only be given valid hex ascii characters */ @@ -312,7 +312,7 @@ UAT_CSTRING_CB_DEF(uat_ue_keys_records, rrcIntegrityKeyString, uat_ue_keys_reco /* Also supporting a hash table with entries from these functions */ /* Table from ueid -> ue_key_entries_t* */ -static wmem_map_t *pdcp_security_key_hash = NULL; +static wmem_map_t *pdcp_security_key_hash; typedef enum { rrc_cipher, @@ -427,9 +427,9 @@ void set_pdcp_lte_up_ciphering_key(guint16 ueid, const char *key, guint32 frame_ /* Preference settings for deciphering and integrity checking. */ static bool global_pdcp_decipher_signalling = true; -static bool global_pdcp_decipher_userplane = false; /* Can be slow, so default to FALSE */ +static bool global_pdcp_decipher_userplane; /* Can be slow, so default to FALSE */ static bool global_pdcp_check_integrity = true; -static bool global_pdcp_ignore_sec = false; /* Ignore Set Security Algo calls */ +static bool global_pdcp_ignore_sec; /* Ignore Set Security Algo calls */ /* Use these values where we know the keys but may have missed the algorithm, e.g. when handing over and RRCReconfigurationRequest goes to target cell only */ @@ -545,7 +545,7 @@ static dissector_handle_t lte_rrc_dl_dcch_nb; static bool global_pdcp_dissect_user_plane_as_ip = true; static bool global_pdcp_dissect_signalling_plane_as_rrc = true; static gint global_pdcp_check_sequence_numbers = TRUE; -static bool global_pdcp_dissect_rohc = false; +static bool global_pdcp_dissect_rohc; /* Which layer info to show in the info column */ enum layer_to_show { @@ -580,7 +580,7 @@ typedef struct /* The sequence analysis channel hash table. Maps key -> status */ -static wmem_map_t *pdcp_sequence_analysis_channel_hash = NULL; +static wmem_map_t *pdcp_sequence_analysis_channel_hash; /* Hash table types & functions for frame reports */ @@ -675,7 +675,7 @@ typedef struct /* The sequence analysis frame report hash table. Maps pdcp_result_hash_key* -> pdcp_sequence_report_in_frame* */ -static wmem_map_t *pdcp_lte_sequence_analysis_report_hash = NULL; +static wmem_map_t *pdcp_lte_sequence_analysis_report_hash; /* Gather together security settings in order to be able to do deciphering */ typedef struct pdu_security_settings_t @@ -1147,7 +1147,7 @@ static void checkChannelSequenceInfo(packet_info *pinfo, tvbuff_t *tvb, /* Hash table for security state for a UE Maps UEId -> pdcp_security_info_t* */ -static wmem_map_t *pdcp_security_hash = NULL; +static wmem_map_t *pdcp_security_hash; /* Result is (ueid, framenum) -> pdcp_security_info_t* */ typedef struct ueid_frame_t { @@ -1191,7 +1191,7 @@ static guint pdcp_lte_ueid_frame_hash_func(gconstpointer v) const ueid_frame_t *ueid_frame = (const ueid_frame_t *)v; return ueid_frame->framenum + 100*ueid_frame->ueid; } -static wmem_map_t *pdcp_security_result_hash = NULL; +static wmem_map_t *pdcp_security_result_hash; diff --git a/epan/dissectors/packet-pdcp-nr.c b/epan/dissectors/packet-pdcp-nr.c index d63864d603..2a3de6d4ba 100644 --- a/epan/dissectors/packet-pdcp-nr.c +++ b/epan/dissectors/packet-pdcp-nr.c @@ -158,11 +158,11 @@ typedef struct { } uat_ue_keys_record_t; /* N.B. this is an array/table of the struct above, where ueid is the key */ -static uat_ue_keys_record_t *uat_ue_keys_records = NULL; +static uat_ue_keys_record_t *uat_ue_keys_records; /* Entries added by UAT */ -static uat_t * ue_keys_uat = NULL; -static guint num_ue_keys_uat = 0; +static uat_t * ue_keys_uat; +static guint num_ue_keys_uat; /* Convert an ascii hex character into a digit. Should only be given valid hex ascii characters */ @@ -302,7 +302,7 @@ UAT_CSTRING_CB_DEF(uat_ue_keys_records, upIntegrityKeyString, uat_ue_keys_recor /* Also supporting a hash table with entries from these functions */ /* Table from ueid -> ue_key_entries_t* */ -static wmem_map_t *pdcp_security_key_hash = NULL; +static wmem_map_t *pdcp_security_key_hash; typedef enum { rrc_cipher, @@ -562,13 +562,13 @@ static dissector_handle_t nr_rrc_dl_dcch; static bool global_pdcp_dissect_user_plane_as_ip = true; static bool global_pdcp_dissect_signalling_plane_as_rrc = true; static gint global_pdcp_check_sequence_numbers = TRUE; -static bool global_pdcp_dissect_rohc = false; +static bool global_pdcp_dissect_rohc; /* Preference settings for deciphering and integrity checking. */ static bool global_pdcp_decipher_signalling = true; -static bool global_pdcp_decipher_userplane = false; /* Can be slow, so default to FALSE */ +static bool global_pdcp_decipher_userplane; /* Can be slow, so default to FALSE */ static bool global_pdcp_check_integrity = true; -static bool global_pdcp_ignore_sec = false; /* Ignore Set Security Algo calls */ +static bool global_pdcp_ignore_sec; /* Ignore Set Security Algo calls */ /* Use these values where we know the keys but may have missed the algorithm, e.g. when handing over and RRCReconfigurationRequest goes to target cell only */ @@ -621,7 +621,7 @@ typedef struct /* The sequence analysis bearer hash table. Maps key -> status */ -static wmem_map_t *pdcp_sequence_analysis_bearer_hash = NULL; +static wmem_map_t *pdcp_sequence_analysis_bearer_hash; /* Hash table types & functions for frame reports */ @@ -716,7 +716,7 @@ typedef struct /* The sequence analysis frame report hash table. Maps pdcp_result_hash_key* -> pdcp_sequence_report_in_frame* */ -static wmem_map_t *pdcp_nr_sequence_analysis_report_hash = NULL; +static wmem_map_t *pdcp_nr_sequence_analysis_report_hash; /* Gather together security settings in order to be able to do deciphering */ typedef struct pdu_security_settings_t @@ -1212,7 +1212,7 @@ static void checkBearerSequenceInfo(packet_info *pinfo, tvbuff_t *tvb, /* Hash table for security state for a UE during first pass. Maps UEId -> pdcp_security_info_t* */ -static wmem_map_t *pdcp_security_hash = NULL; +static wmem_map_t *pdcp_security_hash; typedef struct ueid_frame_t { @@ -1258,7 +1258,7 @@ static guint pdcp_nr_ueid_frame_hash_func(gconstpointer v) } /* Result is ueid_frame_t -> pdcp_security_info_t* */ -static wmem_map_t *pdcp_security_result_hash = NULL; +static wmem_map_t *pdcp_security_result_hash; diff --git a/epan/dissectors/packet-pdu-transport.c b/epan/dissectors/packet-pdu-transport.c index 1bb0d4c4f1..b00107a1fd 100644 --- a/epan/dissectors/packet-pdu-transport.c +++ b/epan/dissectors/packet-pdu-transport.c @@ -43,10 +43,10 @@ void proto_register_pdu_transport(void); void proto_reg_handoff_pdu_transport(void); static int proto_pdu_transport; -static dissector_handle_t pdu_transport_handle_udp = NULL; -static dissector_handle_t pdu_transport_handle_tcp = NULL; +static dissector_handle_t pdu_transport_handle_udp; +static dissector_handle_t pdu_transport_handle_tcp; -static dissector_table_t subdissector_table = NULL; +static dissector_table_t subdissector_table; #define PDU_TRANSPORT_NAME "PDU Transport" #define PDU_TRANSPORT_HDR_LEN 8 @@ -144,9 +144,9 @@ ht_lookup_name(GHashTable *ht, unsigned int identifier) { /*** UAT pdu_transport_CM_IDs ***/ #define DATAFILE_PDU_IDS "PDU_Transport_identifiers" -static GHashTable *data_pdu_transport_pdus = NULL; -static generic_one_id_string_t *pdu_transport_pdus = NULL; -static guint pdu_transport_pdus_num = 0; +static GHashTable *data_pdu_transport_pdus; +static generic_one_id_string_t *pdu_transport_pdus; +static guint pdu_transport_pdus_num; UAT_HEX_CB_DEF(pdu_transport_pdus, id, generic_one_id_string_t) UAT_CSTRING_CB_DEF(pdu_transport_pdus, name, generic_one_id_string_t) diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index 32f82bceb1..e96eda11f6 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -83,7 +83,7 @@ static expert_field ei_per_external_type; static expert_field ei_per_open_type; static expert_field ei_per_open_type_len; -static dissector_table_t per_oid_dissector_table = NULL; +static dissector_table_t per_oid_dissector_table; /* #define DEBUG_ENTRY(x) \ @@ -97,7 +97,7 @@ printf("#%u %s tvb:0x%08x\n",actx->pinfo->num,x,(int)tvb); /* whether the PER helpers should put the internal PER fields into the tree or not. */ -static bool display_internal_per_fields = false; +static bool display_internal_per_fields; diff --git a/epan/dissectors/packet-pfcp.c b/epan/dissectors/packet-pfcp.c index 9bfc9d7406..0091cdd084 100644 --- a/epan/dissectors/packet-pfcp.c +++ b/epan/dissectors/packet-pfcp.c @@ -1270,7 +1270,7 @@ static expert_field ei_pfcp_ie_encoding_error; static int pfcp_tap = -1; -static bool g_pfcp_session = false; +static bool g_pfcp_session; static guint32 pfcp_session_count; typedef struct pfcp_rule_ids { @@ -1993,7 +1993,7 @@ typedef struct pfcp_session_conv_info_t { GHashTable *matched; } pfcp_session_conv_info_t; -static pfcp_session_conv_info_t *pfcp_session_info_items = NULL; +static pfcp_session_conv_info_t *pfcp_session_info_items; /* Data structure attached to a conversation, * to keep track of request/response-pairs @@ -2004,7 +2004,7 @@ typedef struct pfcp_conv_info_t { wmem_map_t *matched; } pfcp_conv_info_t; -static pfcp_conv_info_t *pfcp_info_items = NULL; +static pfcp_conv_info_t *pfcp_info_items; /* structure used to track responses to requests using sequence number */ typedef struct pfcp_msg_hash_entry { @@ -2050,7 +2050,7 @@ pfcp_sn_equal_unmatched(gconstpointer k1, gconstpointer k2) return key1->seq_nr == key2->seq_nr; } -static GHashTable *pfcp_stat_msg_idx_hash = NULL; +static GHashTable *pfcp_stat_msg_idx_hash; static void pfcp_stat_init(struct register_srt* srt _U_, GArray*srt_array) diff --git a/epan/dissectors/packet-pingpongprotocol.c b/epan/dissectors/packet-pingpongprotocol.c index 4687a8906d..99af1444c8 100644 --- a/epan/dissectors/packet-pingpongprotocol.c +++ b/epan/dissectors/packet-pingpongprotocol.c @@ -41,8 +41,8 @@ static int hf_pong_messageno; static int hf_pong_replyno; static int hf_pong_data; -static guint64 pingpongprotocol_total_msgs = 0; -static guint64 pingpongprotocol_total_bytes = 0; +static guint64 pingpongprotocol_total_msgs; +static guint64 pingpongprotocol_total_bytes; /* Dissectors for messages. This is specific to PingPongProtocol */ #define MESSAGE_TYPE_LENGTH 1 diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c index 240b2b1b6f..47217536dd 100644 --- a/epan/dissectors/packet-pkcs12.c +++ b/epan/dissectors/packet-pkcs12.c @@ -55,11 +55,11 @@ static gint ett_decrypted_pbe; static expert_field ei_pkcs12_octet_string_expected; -static const char *object_identifier_id = NULL; -static int iteration_count = 0; -static tvbuff_t *salt = NULL; -static const char *password = NULL; -static bool try_null_password = false; +static const char *object_identifier_id; +static int iteration_count; +static tvbuff_t *salt; +static const char *password; +static bool try_null_password; static int dissect_AuthenticatedSafe_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data); static int dissect_SafeContents_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data); diff --git a/epan/dissectors/packet-pldm.c b/epan/dissectors/packet-pldm.c index 44e6caad81..c958bc2bc8 100644 --- a/epan/dissectors/packet-pldm.c +++ b/epan/dissectors/packet-pldm.c @@ -23,8 +23,8 @@ static int proto_pldm; static int ett_pldm; -static wmem_map_t* pldmTypeMap = NULL; -static wmem_allocator_t *addr_resolv_scope = NULL; +static wmem_map_t* pldmTypeMap; +static wmem_allocator_t *addr_resolv_scope; static int hf_pldm_msg_direction; static int hf_pldm_instance_id; diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index 3cabb4fa54..beeec91046 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -673,7 +673,7 @@ static const value_string ppp_direction_vals[] = { }; /* options */ -static gint ppp_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */ +static gint ppp_fcs_decode; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */ #define NO_FCS 0 #define FCS_16 1 #define FCS_32 2 @@ -691,7 +691,7 @@ const enum_val_t fcs_options[] = { * ID, we can use it */ -static guint pppmux_def_prot_id = 0; +static guint pppmux_def_prot_id; /* PPP definitions */ @@ -5702,7 +5702,7 @@ dissect_cdpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U /* PPP Multilink Protcol (RFC 1990) and * the Multiclass Extension to Multi-Link PPP (RFC 2686) */ -static bool mp_short_seqno = false; /* Default to long sequence numbers */ +static bool mp_short_seqno; /* Default to long sequence numbers */ static guint mp_max_fragments = 6; /* Maximum fragments to try to reassemble. This affects performance and * memory use significantly. */ diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c index 6bf3bc8366..31005b2dd1 100644 --- a/epan/dissectors/packet-pppoe.c +++ b/epan/dissectors/packet-pppoe.c @@ -125,7 +125,7 @@ static dissector_handle_t ppp_handle; /* Preference for showing discovery tag values and lengths */ -static bool global_pppoe_show_tags_and_lengths = false; +static bool global_pppoe_show_tags_and_lengths; #define PPPOE_CODE_SESSION 0x00 diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c index 9e1ea89210..52d4c19e62 100644 --- a/epan/dissectors/packet-pres.c +++ b/epan/dissectors/packet-pres.c @@ -50,8 +50,8 @@ static int proto_pres; static int proto_clpres; /* pointers for acse dissector */ -proto_tree *global_tree = NULL; -packet_info *global_pinfo = NULL; +proto_tree *global_tree; +packet_info *global_pinfo; static const char *abstract_syntax_name_oid; static guint32 presentation_context_identifier; @@ -62,7 +62,7 @@ typedef struct _pres_ctx_oid_t { char *oid; guint32 idx; } pres_ctx_oid_t; -static wmem_map_t *pres_ctx_oid_table = NULL; +static wmem_map_t *pres_ctx_oid_table; typedef struct _pres_user_t { guint ctx_id; diff --git a/epan/dissectors/packet-protobuf.c b/epan/dissectors/packet-protobuf.c index b2b45b50e2..74442d53d4 100644 --- a/epan/dissectors/packet-protobuf.c +++ b/epan/dissectors/packet-protobuf.c @@ -105,7 +105,7 @@ static void protobuf_reinit(int target); static int proto_protobuf; static int proto_protobuf_json_mapping; -static gboolean protobuf_dissector_called = FALSE; +static gboolean protobuf_dissector_called; /* information get from *.proto files */ static int hf_protobuf_message_name; @@ -150,16 +150,16 @@ static int ett_protobuf_packed_repeated; static int ett_protobuf_json; /* preferences */ -static bool try_dissect_as_string = false; -static bool show_all_possible_field_types = false; -static bool dissect_bytes_as_string = false; -static gboolean old_dissect_bytes_as_string = false; -static bool show_details = false; -static bool pbf_as_hf = false; /* dissect protobuf fields as header fields of wireshark */ -static bool preload_protos = false; +static bool try_dissect_as_string; +static bool show_all_possible_field_types; +static bool dissect_bytes_as_string; +static gboolean old_dissect_bytes_as_string; +static bool show_details; +static bool pbf_as_hf; /* dissect protobuf fields as header fields of wireshark */ +static bool preload_protos; /* Show protobuf as JSON similar to https://developers.google.com/protocol-buffers/docs/proto3#json */ -static bool display_json_mapping = false; -static bool use_utc_fmt = false; +static bool display_json_mapping; +static bool use_utc_fmt; static const char* default_message_type = ""; @@ -174,10 +174,10 @@ typedef ENUM_VAL_T_ENUM(add_default_value_policy_vals) add_default_value_policy_ static gint add_default_value = (gint) ADD_DEFAULT_VALUE_NONE; /* dynamic wireshark header fields for protobuf fields */ -static hf_register_info *dynamic_hf = NULL; -static guint dynamic_hf_size = 0; +static hf_register_info *dynamic_hf; +static guint dynamic_hf_size; /* the key is full name of protobuf fields, the value is header field id */ -static GHashTable *pbf_hf_hash = NULL; +static GHashTable *pbf_hf_hash; /* Protobuf field value subdissector table list. * Only valid for the value of PROTOBUF_TYPE_BYTES or PROTOBUF_TYPE_STRING fields. @@ -193,7 +193,7 @@ typedef struct { guint64 value; } protobuf_varint_tvb_info_t; -static PbwDescriptorPool* pbw_pool = NULL; +static PbwDescriptorPool* pbw_pool; /* protobuf source files search paths */ typedef struct { @@ -201,8 +201,8 @@ typedef struct { gboolean load_all; /* load all *.proto files in this directory and its sub directories */ } protobuf_search_path_t; -static protobuf_search_path_t* protobuf_search_paths = NULL; -static guint num_protobuf_search_paths = 0; +static protobuf_search_path_t* protobuf_search_paths; +static guint num_protobuf_search_paths; int proto_http; @@ -240,8 +240,8 @@ typedef struct { gchar *message_type; /* protobuf message type of data on these udp ports */ } protobuf_udp_message_type_t; -static protobuf_udp_message_type_t* protobuf_udp_message_types = NULL; -static guint num_protobuf_udp_message_types = 0; +static protobuf_udp_message_type_t* protobuf_udp_message_types; +static guint num_protobuf_udp_message_types; static void * protobuf_udp_message_types_copy_cb(void* n, const void* o, size_t siz _U_) @@ -289,7 +289,7 @@ protobuf_udp_message_types_free_cb(void*r) UAT_RANGE_CB_DEF(protobuf_udp_message_types, udp_port_range, protobuf_udp_message_type_t) UAT_CSTRING_CB_DEF(protobuf_udp_message_types, message_type, protobuf_udp_message_type_t) -static GSList* old_udp_port_ranges = NULL; +static GSList* old_udp_port_ranges; @@ -299,8 +299,8 @@ typedef struct { gchar *message_type; /* associated protobuf message type */ } protobuf_uri_mapping_t; -static protobuf_uri_mapping_t* protobuf_uri_message_types = NULL; -static guint num_protobuf_uri_message_types = 0; +static protobuf_uri_mapping_t* protobuf_uri_message_types; +static guint num_protobuf_uri_message_types; static void * protobuf_uri_message_type_copy_cb(void* n, const void* o, size_t siz _U_) @@ -1856,7 +1856,7 @@ load_all_files_in_dir(PbwDescriptorPool* pool, const gchar* dir_path, unsigned d /* There might be a lot of errors to be found during parsing .proto files. We buffer the errors first, and print them in one list finally. */ -static wmem_strbuf_t* err_msg_buf = NULL; +static wmem_strbuf_t* err_msg_buf; #define MIN_ERR_STR_BUF_SIZE 512 #define MAX_ERR_STR_BUF_SIZE 1024 diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index 4b7a69bced..6f87918a85 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -2020,7 +2020,7 @@ typedef struct ptp_clock_info { wmem_map_t *frames; } ptp_clock_info_t; -static wmem_map_t *ptp_clocks = NULL; +static wmem_map_t *ptp_clocks; /* * PTP major ver 4 bit diff --git a/epan/dissectors/packet-ptpip.c b/epan/dissectors/packet-ptpip.c index 3f71067489..9160e5e5b1 100644 --- a/epan/dissectors/packet-ptpip.c +++ b/epan/dissectors/packet-ptpip.c @@ -99,7 +99,7 @@ static const enum_val_t pref_hsp_role[] = { }; /* Vendor preference for deciphering opcodes */ -static int pref_vendor = 0; +static int pref_vendor; static const value_string ptp_opcode_names[] = { diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c index 68a5184eb3..38dcc66d32 100644 --- a/epan/dissectors/packet-pvfs2.c +++ b/epan/dissectors/packet-pvfs2.c @@ -2867,7 +2867,7 @@ dissect_pvfs2_response(tvbuff_t *tvb, proto_tree *tree, int offset, return offset; } -static wmem_map_t *pvfs2_io_tracking_value_table = NULL; +static wmem_map_t *pvfs2_io_tracking_value_table; typedef struct pvfs2_io_tracking_key { diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c index e74fe56d37..88b455587d 100644 --- a/epan/dissectors/packet-pw-atm.c +++ b/epan/dissectors/packet-pw-atm.c @@ -247,10 +247,10 @@ static const char shortname_aal5_pdu[] = "MPLS PW ATM AAL5 PDU"; * Note that these options will affect PW type auto-guessing, if such heuristic * implemented in the future. */ -static bool pref_n1_cw_allow_cw_length_nonzero = false; -static bool pref_n1_cw_extend_cw_length_with_rsvd = false; -static bool pref_aal5_sdu_allow_cw_length_nonzero = false; -static bool pref_aal5_sdu_extend_cw_length_with_rsvd = false; +static bool pref_n1_cw_allow_cw_length_nonzero; +static bool pref_n1_cw_extend_cw_length_with_rsvd; +static bool pref_aal5_sdu_allow_cw_length_nonzero; +static bool pref_aal5_sdu_extend_cw_length_with_rsvd; static int diff --git a/epan/dissectors/packet-pw-satop.c b/epan/dissectors/packet-pw-satop.c index f0d12b76f1..f09e0ae8f0 100644 --- a/epan/dissectors/packet-pw-satop.c +++ b/epan/dissectors/packet-pw-satop.c @@ -59,7 +59,7 @@ const char pwc_longname_pw_satop[] = "SAToP"; static const char shortname[] = "SAToP"; /* Preferences */ -static bool pref_has_rtp_header = false; +static bool pref_has_rtp_header; static bool pref_heuristic_rtp_header = true; diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c index 682516d016..b60c490c56 100644 --- a/epan/dissectors/packet-q931.c +++ b/epan/dissectors/packet-q931.c @@ -245,7 +245,7 @@ static reassembly_table q931_reassembly_table; /* Preferences */ static bool q931_reassembly = true; -static bool g931_iso_iec_cause = false; +static bool g931_iso_iec_cause; static dissector_table_t codeset_dissector_table; static dissector_table_t ie_dissector_table; diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index 4661395699..e51123289b 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -74,7 +74,7 @@ static expert_field ei_ros_undecoded; /* Preferences */ /* Subdissectors */ -static dissector_handle_t data_handle = NULL; +static dissector_handle_t data_handle; /* Global variables */ static rose_ctx_t *rose_ctx_tmp; diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c index 9d72411d0f..2781668197 100644 --- a/epan/dissectors/packet-qsig.c +++ b/epan/dissectors/packet-qsig.c @@ -2021,10 +2021,10 @@ static expert_field ei_qsig_unsupported_error_type; /* Preferences */ /* Subdissectors */ -static dissector_handle_t q931_ie_handle = NULL; +static dissector_handle_t q931_ie_handle; /* Global variables */ -static const char *extension_oid = NULL; +static const char *extension_oid; /* Dissector tables */ static dissector_table_t extension_dissector_table; diff --git a/epan/dissectors/packet-quake2.c b/epan/dissectors/packet-quake2.c index 29bd93fec0..f07e583b2a 100644 --- a/epan/dissectors/packet-quake2.c +++ b/epan/dissectors/packet-quake2.c @@ -71,7 +71,7 @@ static gint ett_quake2_game_clc_cmd_move_moves; #define PORT_MASTER 27910 /* Not IANA registered */ -static range_t *gbl_quake2ServerPorts = NULL; +static range_t *gbl_quake2ServerPorts; static void diff --git a/epan/dissectors/packet-quakeworld.c b/epan/dissectors/packet-quakeworld.c index c433515f38..27bae41480 100644 --- a/epan/dissectors/packet-quakeworld.c +++ b/epan/dissectors/packet-quakeworld.c @@ -143,7 +143,7 @@ skipwhite: #define MAX_ARGS 80 -static int cmd_argc = 0; +static int cmd_argc; static const char *cmd_argv[MAX_ARGS]; static const char *cmd_null_string = ""; static int cmd_argv_start[MAX_ARGS]; @@ -312,7 +312,7 @@ static const value_string names_direction[] = { /* I took this name and value directly out of the QW source. */ #define PORT_MASTER 27500 /* Not IANA registered */ -static range_t *gbl_quakeworldServerPorts = NULL; +static range_t *gbl_quakeworldServerPorts; /* out of band message id bytes (taken out of quakeworldsource/client/protocol.h */ diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index 95470c0d02..870dc71b1b 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -107,7 +107,7 @@ typedef struct _radius_info_t */ #define DEFAULT_RADIUS_PORT_RANGE "1645,1646,1700,1812,1813,3799" -static radius_dictionary_t *dict = NULL; +static radius_dictionary_t *dict; static int proto_radius; @@ -205,9 +205,9 @@ static dissector_handle_t radius_handle; static const gchar *shared_secret = ""; -static bool validate_authenticator = false; -static bool show_length = false; -static bool disable_extended_attributes = false; +static bool validate_authenticator; +static bool show_length; +static bool disable_extended_attributes; static guint8 authenticator[AUTHENTICATOR_LENGTH]; diff --git a/epan/dissectors/packet-raknet.c b/epan/dissectors/packet-raknet.c index 5521f98a92..184cda2186 100644 --- a/epan/dissectors/packet-raknet.c +++ b/epan/dissectors/packet-raknet.c @@ -48,11 +48,11 @@ static gint ett_raknet_system_message; /* * Dissectors */ -static dissector_handle_t raknet_handle = NULL; -static dissector_table_t raknet_offline_message_dissectors = NULL; -static dissector_table_t raknet_system_message_dissectors = NULL; -static dissector_table_t raknet_port_dissectors = NULL; -static heur_dissector_list_t raknet_heur_subdissectors = NULL; +static dissector_handle_t raknet_handle; +static dissector_table_t raknet_offline_message_dissectors; +static dissector_table_t raknet_system_message_dissectors; +static dissector_table_t raknet_port_dissectors; +static heur_dissector_list_t raknet_heur_subdissectors; /* * Expert fields diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index 578393353a..8d18a48836 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -445,10 +445,10 @@ void proto_reg_handoff_ranap(void); static int proto_ranap; /* initialise sub-dissector handles */ -static dissector_handle_t rrc_s_to_trnc_handle = NULL; -static dissector_handle_t rrc_t_to_srnc_handle = NULL; -static dissector_handle_t rrc_ho_to_utran_cmd = NULL; -static dissector_handle_t bssgp_handle = NULL; +static dissector_handle_t rrc_s_to_trnc_handle; +static dissector_handle_t rrc_t_to_srnc_handle; +static dissector_handle_t rrc_ho_to_utran_cmd; +static dissector_handle_t bssgp_handle; static int hf_ranap_transportLayerAddress_ipv4; static int hf_ranap_transportLayerAddress_ipv6; @@ -1667,7 +1667,7 @@ static void private_data_set_binding_id_port(asn1_ctx_t *actx, guint16 binding_i static guint32 ProcedureCode; static guint32 ProtocolIE_ID; static guint32 ProtocolExtensionID; -static bool glbl_dissect_container = false; +static bool glbl_dissect_container; static dissector_handle_t ranap_handle; @@ -1694,7 +1694,7 @@ static dissector_handle_t ranap_handle; #define SOUT (2U<<16) #define SPECIAL (4U<<16) -int pdu_type = 0; /* 0 means wildcard */ +int pdu_type; /* 0 means wildcard */ /* Dissector tables */ static dissector_table_t ranap_ies_dissector_table; diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c index 7654d5a828..145d18ee59 100644 --- a/epan/dissectors/packet-reload.c +++ b/epan/dissectors/packet-reload.c @@ -670,7 +670,7 @@ static const gint *reload_dmflag_items[] = { &hf_reload_dmflag_battery_status, }; -static uat_t *reloadkindids_uat = NULL; +static uat_t *reloadkindids_uat; typedef struct _Kind { gchar *name; @@ -701,9 +701,9 @@ static kind_t predefined_kinds[] = { }; -static kind_t * kindidlist_uats = NULL; +static kind_t * kindidlist_uats; -static guint nreloadkinds = 0; +static guint nreloadkinds; static kind_t * getKindFromId(guint32 id) { guint i; diff --git a/epan/dissectors/packet-rf4ce-nwk.c b/epan/dissectors/packet-rf4ce-nwk.c index a3883246ea..a657d28ce2 100644 --- a/epan/dissectors/packet-rf4ce-nwk.c +++ b/epan/dissectors/packet-rf4ce-nwk.c @@ -48,8 +48,8 @@ UAT_CSTRING_CB_DEF(uat_security_records, sec_str, uat_security_record_t) UAT_VS_DEF(uat_security_records, type, uat_security_record_t, guint8, 0, "NWK Key") UAT_CSTRING_CB_DEF(uat_security_records, label, uat_security_record_t) -static uat_security_record_t *uat_security_records = NULL; -static guint num_uat_security_records = 0; +static uat_security_record_t *uat_security_records; +static guint num_uat_security_records; static gint ett_rf4ce_nwk; static gint ett_rf4ce_nwk_payload; diff --git a/epan/dissectors/packet-rf4ce-secur.c b/epan/dissectors/packet-rf4ce-secur.c index 2105e3d7f6..b1e17dcb2e 100644 --- a/epan/dissectors/packet-rf4ce-secur.c +++ b/epan/dissectors/packet-rf4ce-secur.c @@ -22,11 +22,11 @@ void rf4ce_print_arr(const gchar *str, guint8 *ptr, guint16 len); #define RF4CE_PRINT_ARR(s, p, l) #endif /* RF4CE_DEBUG_EN */ -static keypair_context_t keypair_context = {0}; -static key_exchange_context_t key_exchange_context = {0}; -static addr_entry_t addr_table[RF4CE_ADDR_TABLE_SIZE] = {0}; -static nwk_key_entry_t nwk_key_storage[RF4CE_NWK_KEY_STORAGE_SIZE] = {0}; -static vendor_secret_entry_t vendor_secret_storage[RF4CE_VENDOR_SECRET_STORAGE_SIZE] = {0}; +static keypair_context_t keypair_context; +static key_exchange_context_t key_exchange_context; +static addr_entry_t addr_table[RF4CE_ADDR_TABLE_SIZE]; +static nwk_key_entry_t nwk_key_storage[RF4CE_NWK_KEY_STORAGE_SIZE]; +static vendor_secret_entry_t vendor_secret_storage[RF4CE_VENDOR_SECRET_STORAGE_SIZE]; static void keypair_context_calc_key(guint8 *nwk_key); static nwk_key_entry_t *nwk_key_storage_get_entry_by_key(guint8 *nwk_key, gboolean key_from_gui); diff --git a/epan/dissectors/packet-rfid-pn532.c b/epan/dissectors/packet-rfid-pn532.c index 8e226afa3b..71002b1181 100644 --- a/epan/dissectors/packet-rfid-pn532.c +++ b/epan/dissectors/packet-rfid-pn532.c @@ -205,7 +205,7 @@ static int hf_pn532_andet_en; static expert_field ei_unknown_data; static expert_field ei_unexpected_data; -static wmem_tree_t *command_info = NULL; +static wmem_tree_t *command_info; static dissector_handle_t pn532_handle; diff --git a/epan/dissectors/packet-rip.c b/epan/dissectors/packet-rip.c index 7045fb2b82..f0b99145fc 100644 --- a/epan/dissectors/packet-rip.c +++ b/epan/dissectors/packet-rip.c @@ -66,7 +66,7 @@ static const value_string rip_auth_type[] = { #define RIP_ENTRY_LENGTH 20 #define MD5_AUTH_DATA_LEN 16 -static bool pref_display_routing_domain = false; +static bool pref_display_routing_domain; static dissector_handle_t rip_handle; diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index 793acb93bf..734e85e50f 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -66,11 +66,11 @@ static const enum_val_t pdcp_drb_col_vals[] = { static gint global_rlc_lte_call_pdcp_for_drb = (gint)PDCP_drb_SN_signalled; static bool global_rlc_lte_call_rrc_for_ccch = true; -static bool global_rlc_lte_call_rrc_for_mcch = false; -static bool global_rlc_lte_call_ip_for_mtch = false; +static bool global_rlc_lte_call_rrc_for_mcch; +static bool global_rlc_lte_call_ip_for_mtch; /* Preference to expect RLC headers without payloads */ -static bool global_rlc_lte_headers_expected = false; +static bool global_rlc_lte_headers_expected; /* Re-assembly of segments */ static bool global_rlc_lte_reassembly = true; @@ -359,7 +359,7 @@ static const value_string header_only_vals[] = /**********************************************************************************/ /* These are for keeping track of UM/AM extension headers, and the lengths found */ /* in them */ -static guint8 s_number_of_extensions = 0; +static guint8 s_number_of_extensions; #define MAX_RLC_SDUS 192 static guint16 s_lengths[MAX_RLC_SDUS]; @@ -419,7 +419,7 @@ typedef struct } channel_sequence_analysis_status; /* The sequence analysis channel hash table */ -static wmem_map_t *sequence_analysis_channel_hash = NULL; +static wmem_map_t *sequence_analysis_channel_hash; /* Types for sequence analysis frame report hash table */ @@ -450,7 +450,7 @@ typedef struct /* The sequence analysis frame report hash table instance itself */ -static wmem_map_t *sequence_analysis_report_hash = NULL; +static wmem_map_t *sequence_analysis_report_hash; static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber, @@ -461,7 +461,7 @@ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber, /* The reassembly result hash table */ -static wmem_map_t *reassembly_report_hash = NULL; +static wmem_map_t *reassembly_report_hash; /* Create a new struct for reassembly */ @@ -625,7 +625,7 @@ typedef struct guint32 frameNum; } channel_repeated_nack_status; -static wmem_map_t *repeated_nack_channel_hash = NULL; +static wmem_map_t *repeated_nack_channel_hash; typedef struct { guint16 noOfNACKsRepeated; @@ -633,7 +633,7 @@ typedef struct { guint32 previousFrameNum; } channel_repeated_nack_report; -static wmem_map_t *repeated_nack_report_hash = NULL; +static wmem_map_t *repeated_nack_report_hash; diff --git a/epan/dissectors/packet-rlc-nr.c b/epan/dissectors/packet-rlc-nr.c index 4018babeaf..91a29a5cef 100644 --- a/epan/dissectors/packet-rlc-nr.c +++ b/epan/dissectors/packet-rlc-nr.c @@ -59,10 +59,10 @@ static gint global_rlc_nr_call_pdcp_for_dl_drb = (gint)PDCP_drb_off; static bool global_rlc_nr_call_rrc_for_ccch = true; /* Preference to expect RLC headers without payloads */ -static bool global_rlc_nr_headers_expected = false; +static bool global_rlc_nr_headers_expected; /* Attempt reassembly. */ -static bool global_rlc_nr_reassemble_um_pdus = false; +static bool global_rlc_nr_reassemble_um_pdus; static bool global_rlc_nr_reassemble_am_pdus = true; /* Tree storing UE related parameters (ueid, drbid) -> pdcp_bearer_parameters */ diff --git a/epan/dissectors/packet-rnsap.c b/epan/dissectors/packet-rnsap.c index c850830589..602e1d4755 100644 --- a/epan/dissectors/packet-rnsap.c +++ b/epan/dissectors/packet-rnsap.c @@ -1270,9 +1270,9 @@ typedef struct { const char *obj_id; } rnsap_private_data_t; -static dissector_handle_t ranap_handle = NULL; -static dissector_handle_t rrc_dl_ccch_handle = NULL; -static dissector_handle_t rrc_ul_ccch_handle = NULL; +static dissector_handle_t ranap_handle; +static dissector_handle_t rrc_dl_ccch_handle; +static dissector_handle_t rrc_ul_ccch_handle; /* Initialize the protocol and registered fields */ static int proto_rnsap; diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c index 9b6a8ffa84..298d5c2225 100644 --- a/epan/dissectors/packet-rohc.c +++ b/epan/dissectors/packet-rohc.c @@ -37,7 +37,7 @@ dissect_compressed_list(int expected_encoding_type _U_, packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int offset); /* cid -> rohc_cid_context_t* */ -static GHashTable *rohc_cid_hash = NULL; +static GHashTable *rohc_cid_hash; /* Initialize the protocol and registered fields */ static int proto_rohc; diff --git a/epan/dissectors/packet-ros.c b/epan/dissectors/packet-ros.c index 14238598d9..6c71a5e29c 100644 --- a/epan/dissectors/packet-ros.c +++ b/epan/dissectors/packet-ros.c @@ -35,11 +35,11 @@ void proto_reg_handoff_ros(void); /* Initialize the protocol and registered fields */ static int proto_ros; -static proto_tree *top_tree=NULL; +static proto_tree *top_tree; static guint32 opcode; static guint32 invokeid; -static dissector_handle_t ros_handle = NULL; +static dissector_handle_t ros_handle; typedef struct ros_conv_info_t { wmem_map_t *unmatched; /* unmatched operations */ @@ -111,9 +111,9 @@ static gint ett_ros_Code; static expert_field ei_ros_dissector_oid_not_implemented; static expert_field ei_ros_unknown_ros_pdu; -static dissector_table_t ros_oid_dissector_table=NULL; +static dissector_table_t ros_oid_dissector_table; -static wmem_map_t *protocol_table=NULL; +static wmem_map_t *protocol_table; void register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_rtse) diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index 8fe6a6f7ea..cb661f5d19 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -72,16 +72,16 @@ static bool rpc_defragment = true; /* try to dissect RPC packets for programs that are not known * (proprietary ones) by wireshark. */ -static bool rpc_dissect_unknown_programs = false; +static bool rpc_dissect_unknown_programs; /* try to find RPC fragment start if normal decode fails * (good when starting decode of mid-stream capture) */ -static bool rpc_find_fragment_start = false; +static bool rpc_find_fragment_start; static int rpc_tap; -static dissector_handle_t spnego_krb5_wrap_handle = NULL; +static dissector_handle_t spnego_krb5_wrap_handle; static const value_string rpc_msg_type[] = { { RPC_CALL, "Call" }, @@ -310,7 +310,7 @@ static const fragment_items rpc_frag_items = { }; /* Hash table with info on RPC program numbers */ -GHashTable *rpc_progs = NULL; +GHashTable *rpc_progs; typedef gboolean (*rec_dissector_t)(tvbuff_t *, packet_info *, proto_tree *, tvbuff_t *, fragment_head *, int, guint32, gboolean, gboolean); @@ -321,8 +321,8 @@ static char *rpc_proc_name_internal(wmem_allocator_t *allocator, guint32 prog, guint32 vers, guint32 proc); -static guint32 rpc_program = 0; -static guint32 rpc_version = 0; +static guint32 rpc_program; +static guint32 rpc_version; static gint32 rpc_min_proc = -1; static gint32 rpc_max_proc = -1; @@ -642,7 +642,7 @@ typedef struct _rpc_conv_info_t { a global tree for all contexts should still be unlikely to have collissions here. */ -wmem_tree_t *authgss_contexts = NULL; +wmem_tree_t *authgss_contexts; unsigned int rpc_roundup(unsigned int a) @@ -3076,7 +3076,7 @@ static reassembly_table rpc_fragment_table; * so that they don't try to combine fragments from different TCP * connections.) */ -static wmem_map_t *rpc_reassembly_table = NULL; +static wmem_map_t *rpc_reassembly_table; typedef struct _rpc_fragment_key { guint32 conv_id; diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index bc596df7f5..45d393b98b 100644 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -221,7 +221,7 @@ static int global_linktype = -1; /* Global variables */ static int linktype = -1; -static gboolean info_added = FALSE; +static gboolean info_added; static const value_string message_type[] = { { RPCAP_MSG_ERROR, "Error" }, diff --git a/epan/dissectors/packet-rpcrdma.c b/epan/dissectors/packet-rpcrdma.c index 901ff4c4a1..7e5a06e9e8 100644 --- a/epan/dissectors/packet-rpcrdma.c +++ b/epan/dissectors/packet-rpcrdma.c @@ -242,19 +242,19 @@ enum { * an extra argument to differentiate between InfiniBand and iWarp. * Reassembly is only supported for InfiniBand packets. */ -static struct infinibandinfo *gp_infiniband_info = NULL; +static struct infinibandinfo *gp_infiniband_info; /* Global variable set for every iWarp packet */ -static rdmap_info_t *gp_rdmap_info = NULL; +static rdmap_info_t *gp_rdmap_info; /* Call process_reassembled_data just once per frame */ -static gboolean g_needs_reassembly = FALSE; +static gboolean g_needs_reassembly; /* Array of offsets for reduced data in write chunks */ -static wmem_array_t *gp_rdma_write_offsets = NULL; +static wmem_array_t *gp_rdma_write_offsets; /* Signal upper layer(s) the current frame's data has been reduced by DDP */ -static gboolean g_rpcrdma_reduced = FALSE; +static gboolean g_rpcrdma_reduced; /* * Signal upper layer(s) the current frame's data has been reduced by DDP diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 714847917a..569d97e70f 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -57,9 +57,9 @@ extern int proto_fp; /*Handler to FP*/ extern int proto_umts_mac; /*Handler to MAC*/ extern int proto_umts_rlc; /*Handler to RLC*/ -GTree * hsdsch_muxed_flows = NULL; -GTree * rrc_ciph_info_tree = NULL; -wmem_tree_t* rrc_global_urnti_crnti_map = NULL; +GTree * hsdsch_muxed_flows; +GTree * rrc_ciph_info_tree; +wmem_tree_t* rrc_global_urnti_crnti_map; static int msg_type _U_; static bool rrc_nas_in_root_tree; @@ -294,16 +294,16 @@ static void private_data_set_curr_sib_type(asn1_ctx_t *actx, guint32 curr_sib_ty /*****************************************************************************/ static dissector_handle_t gsm_a_dtap_handle; -static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL; -static dissector_handle_t rrc_pcch_handle=NULL; -static dissector_handle_t rrc_ul_ccch_handle=NULL; -static dissector_handle_t rrc_dl_ccch_handle=NULL; -static dissector_handle_t rrc_ul_dcch_handle=NULL; -static dissector_handle_t rrc_dl_dcch_handle=NULL; -static dissector_handle_t rrc_bcch_fach_handle=NULL; -static dissector_handle_t lte_rrc_ue_eutra_cap_handle=NULL; -static dissector_handle_t lte_rrc_dl_dcch_handle=NULL; -static dissector_handle_t gsm_rlcmac_dl_handle=NULL; +static dissector_handle_t rrc_ue_radio_access_cap_info_handle; +static dissector_handle_t rrc_pcch_handle; +static dissector_handle_t rrc_ul_ccch_handle; +static dissector_handle_t rrc_dl_ccch_handle; +static dissector_handle_t rrc_ul_dcch_handle; +static dissector_handle_t rrc_dl_dcch_handle; +static dissector_handle_t rrc_bcch_fach_handle; +static dissector_handle_t lte_rrc_ue_eutra_cap_handle; +static dissector_handle_t lte_rrc_dl_dcch_handle; +static dissector_handle_t gsm_rlcmac_dl_handle; /* Forward declarations */ void proto_register_rrc(void); diff --git a/epan/dissectors/packet-rsh.c b/epan/dissectors/packet-rsh.c index 2514705d47..9b74267456 100644 --- a/epan/dissectors/packet-rsh.c +++ b/epan/dissectors/packet-rsh.c @@ -30,9 +30,9 @@ void proto_reg_handoff_rsh(void); static dissector_handle_t rsh_handle; /* Variables for our preferences */ -static bool preference_info_show_client_username = false; +static bool preference_info_show_client_username; static bool preference_info_show_server_username = true; -static bool preference_info_show_command = false; +static bool preference_info_show_command; /* Initialize the protocol and registered fields */ static int proto_rsh; diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c index 88ab60be9f..b5cbc2c5e0 100644 --- a/epan/dissectors/packet-rsl.c +++ b/epan/dissectors/packet-rsl.c @@ -282,10 +282,10 @@ static dissector_handle_t gsm_a_dtap_handle; static dissector_handle_t gsm_a_sacch_handle; /* Decode things as nanoBTS traces */ -static bool global_rsl_use_nano_bts = false; +static bool global_rsl_use_nano_bts; /* Decode Osmocom specific messages and IEs */ -static bool global_rsl_use_osmo_bts = false; +static bool global_rsl_use_osmo_bts; /* Decode things in Physical Context Information field. */ static bool global_rsl_dissect_phy_ctx_inf = true; diff --git a/epan/dissectors/packet-rsvd.c b/epan/dissectors/packet-rsvd.c index d34200fd0e..5f545cea71 100644 --- a/epan/dissectors/packet-rsvd.c +++ b/epan/dissectors/packet-rsvd.c @@ -161,9 +161,9 @@ typedef struct _rsvd_conv_data_t { conversation_t *conversation; } rsvd_conv_data_t; -static rsvd_conv_data_t *rsvd_conv_data = NULL; +static rsvd_conv_data_t *rsvd_conv_data; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static itl_nexus_t * get_itl_nexus(packet_info *pinfo) diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 6d985b4d42..5d19773a07 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -756,7 +756,7 @@ struct rsvp_request_val { /* * Initialize the conversation related data structures. */ -static wmem_map_t *rsvp_request_hash = NULL; +static wmem_map_t *rsvp_request_hash; /* * The list of tree types diff --git a/epan/dissectors/packet-rsync.c b/epan/dissectors/packet-rsync.c index f81cf69c66..f1caf1cff1 100644 --- a/epan/dissectors/packet-rsync.c +++ b/epan/dissectors/packet-rsync.c @@ -78,7 +78,7 @@ static dissector_handle_t rsync_handle; #define TCP_PORT_RSYNC 873 -static range_t *glb_rsync_tcp_range = NULL; +static range_t *glb_rsync_tcp_range; #define VERSION_LEN 4 /* 2 digits for main version; '.'; 1 digit for sub version */ diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 46a3095c68..cf1f537e21 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -931,7 +931,7 @@ static bool global_rtcp_show_setup_info = true; static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Related to roundtrip calculation (using LSR and DLSR) */ -static bool global_rtcp_show_roundtrip_calculation = false; +static bool global_rtcp_show_roundtrip_calculation; #define MIN_ROUNDTRIP_TO_REPORT_DEFAULT 10 static guint global_rtcp_show_roundtrip_calculation_minimum = MIN_ROUNDTRIP_TO_REPORT_DEFAULT; static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr); diff --git a/epan/dissectors/packet-rtitcp.c b/epan/dissectors/packet-rtitcp.c index a91d3e6fc2..fd64ab9e00 100644 --- a/epan/dissectors/packet-rtitcp.c +++ b/epan/dissectors/packet-rtitcp.c @@ -170,7 +170,7 @@ static gint ett_rtitcp_message; static gint ett_rtitcp_attributes_list; static gint ett_rtitcp_attribute; -static header_field_info *hfi_rtitcp = NULL; +static header_field_info *hfi_rtitcp; static heur_dissector_list_t heur_subdissector_list; static const value_string ctrl_message_types_vals[] = { diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index 6df5f66de4..3d60cac0c1 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -742,7 +742,7 @@ rtp_dump_dyn_payload(rtp_dyn_payload_t *rtp_dyn_payload) { single registered callback walk this GHashTable and destroy each member as well as this GHashTable. */ -static GHashTable *rtp_dyn_payloads = NULL; +static GHashTable *rtp_dyn_payloads; static gboolean fmtp_free(gpointer key, gpointer value, gpointer user_data) diff --git a/epan/dissectors/packet-rtpproxy.c b/epan/dissectors/packet-rtpproxy.c index f4a46e6fdc..45040cccd3 100644 --- a/epan/dissectors/packet-rtpproxy.c +++ b/epan/dissectors/packet-rtpproxy.c @@ -276,14 +276,14 @@ static gint ett_rtpproxy_ng_bencode; /* Default values */ #define RTPPROXY_PORT "22222" /* Not IANA registered */ -static range_t* rtpproxy_tcp_range = NULL; -static range_t* rtpproxy_udp_range = NULL; +static range_t* rtpproxy_tcp_range; +static range_t* rtpproxy_udp_range; static bool rtpproxy_establish_conversation = true; /* See - https://www.opensips.org/html/docs/modules/1.10.x/rtpproxy.html#id293555 */ /* See - http://www.kamailio.org/docs/modules/4.3.x/modules/rtpproxy.html#idp15794952 */ static guint rtpproxy_timeout = 1000; -static nstime_t rtpproxy_timeout_ns = NSTIME_INIT_ZERO; +static nstime_t rtpproxy_timeout_ns; void proto_reg_handoff_rtpproxy(void); diff --git a/epan/dissectors/packet-rtps-processed.c b/epan/dissectors/packet-rtps-processed.c index 6f5d76d921..146c1bcf4e 100644 --- a/epan/dissectors/packet-rtps-processed.c +++ b/epan/dissectors/packet-rtps-processed.c @@ -87,12 +87,12 @@ static gint ett_rtpsproc_advanced_frame0; static gint ett_rtpsproc_advanced_frame1; /* Initialize the protocol and registered fields */ -static header_field_info *rtpsproc_hf = NULL; +static header_field_info *rtpsproc_hf; static int hf_rtpsproc_param_id; static int hf_rtpsproc_param_length; /* Used for caching a handle to the RTPS dissector */ -static dissector_handle_t rtps_handle = NULL; +static dissector_handle_t rtps_handle; /* ========================================================================== */ /* Dissector */ diff --git a/epan/dissectors/packet-rtps-virtual-transport.c b/epan/dissectors/packet-rtps-virtual-transport.c index 38df5b9ef2..61de01dd53 100644 --- a/epan/dissectors/packet-rtps-virtual-transport.c +++ b/epan/dissectors/packet-rtps-virtual-transport.c @@ -127,7 +127,7 @@ static gint ett_rtpsvt_monitoring_sn; static gint ett_rtpsvt_frame; /* Initialize the protocol and registered fields */ -static header_field_info *rtpsvt_hf = NULL; +static header_field_info *rtpsvt_hf; static gint hf_rtpsvt_version; static gint hf_rtpsvt_version_major; static gint hf_rtpsvt_version_minor; diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index 3bfc74667b..b00addf2bf 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -244,10 +244,10 @@ static const value_string type_object_kind [] = { { 0, NULL } }; -static wmem_map_t * dissection_infos = NULL; -static wmem_map_t * builtin_dissection_infos = NULL; -static wmem_map_t * union_member_mappings = NULL; -static wmem_map_t * mutable_member_mappings = NULL; +static wmem_map_t * dissection_infos; +static wmem_map_t * builtin_dissection_infos; +static wmem_map_t * union_member_mappings; +static wmem_map_t * mutable_member_mappings; /***************************************************************************/ /* Preferences */ @@ -256,11 +256,11 @@ static guint rtps_max_batch_samples_dissected = 16; static guint rtps_max_data_type_elements = DISSECTION_INFO_MAX_ELEMENTS_DEFAULT_VALUE; static guint rtps_max_array_data_type_elements = DISSECTION_INFO_ARRAY_MAX_ELEMENTS_DEFAULT_VALUE; static bool enable_topic_info = true; -static bool enable_rtps_reassembly = false; -static bool enable_user_data_dissection = false; +static bool enable_rtps_reassembly; +static bool enable_user_data_dissection; static bool enable_max_array_data_type_elements = true; static bool enable_max_data_type_elements = true; -static bool enable_rtps_crc_check = false; +static bool enable_rtps_crc_check; static dissector_table_t rtps_type_name_table; /***************************************************************************/ @@ -2740,7 +2740,7 @@ typedef struct _coherent_set_track { } coherent_set_track; static coherent_set_track coherent_set_tracking; -static wmem_map_t * registry = NULL; +static wmem_map_t * registry; static reassembly_table rtps_reassembly_table; static wmem_map_t *discovered_participants_domain_ids; diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index 3d163164c0..981d85ea78 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -44,7 +44,7 @@ static int proto_rtse; static gboolean open_request=FALSE; static guint32 app_proto=0; -static proto_tree *top_tree=NULL; +static proto_tree *top_tree; /* Preferences */ static bool rtse_reassemble = true; @@ -89,8 +89,8 @@ static expert_field ei_rtse_dissector_oid_not_implemented; static expert_field ei_rtse_unknown_rtse_pdu; static expert_field ei_rtse_abstract_syntax; -static dissector_table_t rtse_oid_dissector_table=NULL; -static dissector_handle_t rtse_handle = NULL; +static dissector_table_t rtse_oid_dissector_table; +static dissector_handle_t rtse_handle; static gint ett_rtse_unknown; static reassembly_table rtse_reassembly_table; diff --git a/epan/dissectors/packet-rudp.c b/epan/dissectors/packet-rudp.c index d4c0bde570..e7edfcd5b5 100644 --- a/epan/dissectors/packet-rudp.c +++ b/epan/dissectors/packet-rudp.c @@ -58,7 +58,7 @@ static int hf_rudp_cksum; static gint ett_rudp; static gint ett_rudp_flags; -static dissector_handle_t sm_handle = NULL; +static dissector_handle_t sm_handle; static int dissect_rudp(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree, void* data _U_) diff --git a/epan/dissectors/packet-s101.c b/epan/dissectors/packet-s101.c index d47b196df1..67a98622df 100644 --- a/epan/dissectors/packet-s101.c +++ b/epan/dissectors/packet-s101.c @@ -64,7 +64,7 @@ static int hf_S101_eof; static int hf_S101_error; static dissector_handle_t S101_handle; -static dissector_handle_t glow_handle = NULL; +static dissector_handle_t glow_handle; static reassembly_table s101_data_reassembly_table; typedef struct _s101_fragment_t { @@ -149,7 +149,7 @@ static guint32 get_fragment_pdu_id(packet_info *pinfo) { return id; } -static wmem_map_t* s101_fragment_info_hash = NULL; +static wmem_map_t* s101_fragment_info_hash; static s101_fragment_t* new_fragment_info(packet_info *pinfo) { s101_fragment_t* fi = wmem_new(wmem_file_scope(), s101_fragment_t); diff --git a/epan/dissectors/packet-s5066dts.c b/epan/dissectors/packet-s5066dts.c index 0d3a70782e..e5bd77bd07 100644 --- a/epan/dissectors/packet-s5066dts.c +++ b/epan/dissectors/packet-s5066dts.c @@ -73,7 +73,7 @@ static expert_field ei_s5066dts_eow_hftrp_invalid; /* TCP port that will be listened by the application that peer * dts layers will be connected through */ -static range_t *config_s5066dts_ports = NULL; +static range_t *config_s5066dts_ports; static gint hf_s5066dts_sync_word; static gint hf_s5066dts_dpdu_type; diff --git a/epan/dissectors/packet-s5066sis.c b/epan/dissectors/packet-s5066sis.c index 8f401e41e4..141ee378a5 100644 --- a/epan/dissectors/packet-s5066sis.c +++ b/epan/dissectors/packet-s5066sis.c @@ -74,7 +74,7 @@ static dissector_table_t s5066sis_dissector_table; /* Enable desegmentation of S5066 over TCP */ static bool s5066_desegment = true; /* Dissect old 'edition 1' of STANAG 5066 (It lacks the 'version' field.) */ -static bool s5066_edition_one = false; +static bool s5066_edition_one; /* This port is registered with IANA */ #define S5066_PORT 5066 /* Size of header outside 'size' field */ diff --git a/epan/dissectors/packet-sametime.c b/epan/dissectors/packet-sametime.c index 1c648077fd..ec4616e55e 100644 --- a/epan/dissectors/packet-sametime.c +++ b/epan/dissectors/packet-sametime.c @@ -25,7 +25,7 @@ static int proto_sametime; static dissector_handle_t sametime_handle; /*preferences*/ -static bool global_sametime_show_length = false; +static bool global_sametime_show_length; static bool global_sametime_reassemble_packets = true; /*heart beat*/ diff --git a/epan/dissectors/packet-sane.c b/epan/dissectors/packet-sane.c index caa5e1dcaa..639b479325 100644 --- a/epan/dissectors/packet-sane.c +++ b/epan/dissectors/packet-sane.c @@ -49,7 +49,7 @@ #define SANE_MODULE_NAME "sane" #define SANE_PORT "6566" -static range_t *sane_server_ports = NULL; +static range_t *sane_server_ports; static dissector_handle_t sane_handle; diff --git a/epan/dissectors/packet-sbc-ap.c b/epan/dissectors/packet-sbc-ap.c index dddd1480c5..ba9440d121 100644 --- a/epan/dissectors/packet-sbc-ap.c +++ b/epan/dissectors/packet-sbc-ap.c @@ -41,7 +41,7 @@ void proto_reg_handoff_sbc_ap(void); * The registered payload protocol identifier for SBc-AP is 24. */ #define SBC_AP_PORT 29168 -static dissector_handle_t sbc_ap_handle=NULL; +static dissector_handle_t sbc_ap_handle; #define maxNrOfErrors 256 diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c index b02f28fb61..3cd8f360d5 100644 --- a/epan/dissectors/packet-sbus.c +++ b/epan/dissectors/packet-sbus.c @@ -553,7 +553,7 @@ typedef struct { } sbus_request_val; /* The hash structure (for conversations)*/ -static wmem_map_t *sbus_request_hash = NULL; +static wmem_map_t *sbus_request_hash; static guint crc_calc (guint crc, guint val) { diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index 46294e6988..1ab56c8033 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -710,9 +710,9 @@ static expert_field ei_sccp_externally_reassembled; static bool sccp_reassemble = true; -static bool show_key_params = false; -static bool set_addresses = false; -static bool dt1_ignore_length = false; +static bool show_key_params; +static bool set_addresses; +static bool dt1_ignore_length; static int ss7pc_address_type = -1; @@ -781,7 +781,7 @@ static dissector_handle_t bssap_le_handle; static dissector_handle_t bssap_plus_handle; static dissector_handle_t default_handle; -static const char *default_payload = NULL; +static const char *default_payload; static const value_string sccp_users_vals[] = { { SCCP_USER_DATA, "Data"}, @@ -801,17 +801,17 @@ static const value_string sccp_users_vals[] = { * Here are the global variables associated with * the various user definable characteristics of the dissection */ -static guint32 sccp_source_pc_global = 0; -static bool sccp_show_length = false; -static bool trace_sccp = false; +static guint32 sccp_source_pc_global; +static bool sccp_show_length; +static bool trace_sccp; static heur_dissector_list_t heur_subdissector_list; static dissector_table_t sccp_ssn_dissector_table; -static wmem_tree_t *assocs = NULL; +static wmem_tree_t *assocs; static sccp_assoc_info_t no_assoc = { 0,0,0,INVALID_SSN,INVALID_SSN,FALSE,FALSE,NULL,NULL,SCCP_PLOAD_NONE,NULL,NULL,NULL, NULL, 0 }; -static guint32 next_assoc_id = 0; +static guint32 next_assoc_id; static const value_string assoc_protos[] = { { SCCP_PLOAD_BSSAP, "BSSAP" }, diff --git a/epan/dissectors/packet-scriptingservice.c b/epan/dissectors/packet-scriptingservice.c index cdf0c21023..556a5ce538 100644 --- a/epan/dissectors/packet-scriptingservice.c +++ b/epan/dissectors/packet-scriptingservice.c @@ -39,8 +39,8 @@ static int hf_message_info; static int hf_message_hash; static int hf_environment_u_bit; -static guint64 ssprotocol_total_msgs = 0; -static guint64 ssprotocol_total_bytes = 0; +static guint64 ssprotocol_total_msgs; +static guint64 ssprotocol_total_bytes; /* Initialize the subtree pointers */ static gint ett_ssprotocol; diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c index b773385d7e..e7b0730e3a 100644 --- a/epan/dissectors/packet-scsi.c +++ b/epan/dissectors/packet-scsi.c @@ -766,7 +766,7 @@ static expert_field ei_scsi_unknown_serv_action; static int scsi_tap; /* Defragment of SCSI DATA IN/OUT */ -static bool scsi_defragment = false; +static bool scsi_defragment; static reassembly_table scsi_reassembly_table; diff --git a/epan/dissectors/packet-scte35.c b/epan/dissectors/packet-scte35.c index 4c081960a7..117cd918e1 100644 --- a/epan/dissectors/packet-scte35.c +++ b/epan/dissectors/packet-scte35.c @@ -64,7 +64,7 @@ static const int SCTE35_SI_MIN_LEN = 20; static int proto_scte35; /* Dissector table for scte35.splice_command_type */ -static dissector_table_t scte35_cmd_dissector_table = NULL; +static dissector_table_t scte35_cmd_dissector_table; /* splice_info_section table */ @@ -133,9 +133,9 @@ static gint hf_identifier; static gint hf_private_byte; /* Dissector table for scte35_private_command.identifier */ -static dissector_table_t private_identifier_table = NULL; +static dissector_table_t private_identifier_table; -static dissector_handle_t scte35_handle = NULL; +static dissector_handle_t scte35_handle; static dissector_handle_t scte35_time_handle; static dissector_handle_t scte35_private_command_handle; static dissector_handle_t scte35_si_handle; diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index cad38c09bd..93872a2dc6 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -394,7 +394,7 @@ WS_DLL_PUBLIC_DEF const value_string chunk_type_values[] = { static bool show_port_numbers = true; static gint sctp_checksum = SCTP_CHECKSUM_NONE; static bool enable_tsn_analysis = true; -static bool enable_association_indexing = false; +static bool enable_association_indexing; static bool enable_ulp_dissection = true; static bool use_reassembly = true; static bool show_always_control_chunks = true; @@ -413,8 +413,8 @@ typedef struct _type_field_t { guint type_enable; } type_field_t; -static type_field_t* type_fields = NULL; -static guint num_type_fields = 0; +static type_field_t* type_fields; +static guint num_type_fields; typedef struct _assoc_info_t { guint16 assoc_index; @@ -432,9 +432,9 @@ typedef struct _infodata_t { guint16 direction; } infodata_t; -static wmem_map_t *assoc_info_half_map = NULL; -static wmem_map_t *assoc_info_map = NULL; -static guint num_assocs = 0; +static wmem_map_t *assoc_info_half_map; +static wmem_map_t *assoc_info_map; +static guint num_assocs; UAT_CSTRING_CB_DEF(type_fields, type_name, type_field_t) UAT_VS_DEF(type_fields, type_enable, type_field_t, guint, 0, "Show") @@ -2528,7 +2528,7 @@ dissect_error_causes(tvbuff_t *causes_tvb, packet_info *pinfo, proto_tree *tree) * Code to actually dissect the packets */ -static bool try_heuristic_first = false; +static bool try_heuristic_first; static gboolean dissect_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree, guint32 ppi) @@ -2672,7 +2672,7 @@ dissect_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree, gui #define SCTP_DATA_CHUNK_I_BIT 0x08 /* table to hold fragmented SCTP messages */ -static GHashTable *frag_table = NULL; +static GHashTable *frag_table; typedef struct _frag_key { diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index 7ec98a81c2..2eba136792 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -66,8 +66,8 @@ static int proto_sdp; static int proto_sprt; static const char* UNKNOWN_ENCODING = "Unknown"; -static wmem_tree_t *sdp_transport_reqs = NULL; -static wmem_tree_t *sdp_transport_rsps = NULL; +static wmem_tree_t *sdp_transport_reqs; +static wmem_tree_t *sdp_transport_rsps; /* preference globals */ static bool global_sdp_establish_conversation = true; diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c index d960b85802..1b431a3586 100644 --- a/epan/dissectors/packet-selfm.c +++ b/epan/dissectors/packet-selfm.c @@ -333,8 +333,8 @@ static dissector_handle_t selfm_handle; /* Globals for SEL Protocol Preferences */ static bool selfm_desegment = true; static bool selfm_telnet_clean = true; -static bool selfm_crc16 = false; /* Default CRC16 validation to false */ -static const char *selfm_ser_list = NULL; +static bool selfm_crc16; /* Default CRC16 validation to false */ +static const char *selfm_ser_list; /***************************************************************************************/ /* Fast Meter Message structs */ diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c index 8d565f975b..423cbd666a 100644 --- a/epan/dissectors/packet-ses.c +++ b/epan/dissectors/packet-ses.c @@ -187,7 +187,7 @@ static expert_field ei_ses_bad_parameter_length; #define PROTO_STRING_CLSES "ISO 9548-1 OSI Connectionless Session Protocol" -static dissector_handle_t pres_handle = NULL; +static dissector_handle_t pres_handle; static reassembly_table ses_reassembly_table; @@ -321,8 +321,8 @@ static value_string_ext reason_vals_ext = VALUE_STRING_EXT_INIT(reason_vals); static bool ses_desegment = true; /* RTSE reassembly data */ -static guint ses_pres_ctx_id = 0; -static gboolean ses_rtse_reassemble = FALSE; +static guint ses_pres_ctx_id; +static gboolean ses_rtse_reassemble; static void call_pres_dissector(tvbuff_t *tvb, int offset, guint16 param_len, diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index 0f3a44667d..883612e406 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -55,7 +55,7 @@ static dissector_handle_t sflow_handle; * sflow_245_ports : holds the currently used range of ports for sflow */ static bool global_dissect_samp_headers = true; -static bool global_analyze_samp_ip_headers = false; +static bool global_analyze_samp_ip_headers; #define ENTERPRISE_DEFAULT 0 diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c index f8ab0a87c7..6b961739b2 100644 --- a/epan/dissectors/packet-sigcomp.c +++ b/epan/dissectors/packet-sigcomp.c @@ -165,16 +165,16 @@ static dissector_handle_t sigcomp_tcp_handle; #define SIGCOMP_TCP_PORT_RANGE "5555,6666" /* Not IANA registered */ /* Default preference whether to display the bytecode in UDVM operands or not */ -static bool display_udvm_bytecode = false; +static bool display_udvm_bytecode; /* Default preference whether to dissect the UDVM code or not */ /* WARNING: Setting this to true might result in the entire dissector being disabled by default or removed completely. */ -static bool dissect_udvm_code = false; -static bool display_raw_txt = false; +static bool dissect_udvm_code; +static bool display_raw_txt; /* Default preference whether to decompress the message or not */ /* WARNING: Setting this to true might result in the entire dissector being disabled by default or removed completely. */ -static bool decompress = false; +static bool decompress; /* Default preference whether to print debug info at execution of UDVM * 0 = No printout * 1 = details level 1 @@ -182,7 +182,7 @@ static bool decompress = false; * 3 = details level 3 * 4 = details level 4 */ -static gint udvm_print_detail_level = 0; +static gint udvm_print_detail_level; /* Value strings */ static const value_string length_encoding_vals[] = { @@ -897,7 +897,7 @@ static const guint8 presence_static_dictionary_for_sigcomp[PRESENCE_STATE_LENGTH /* -0D90, */ 0x09, 0x0b, 0x2a }; -static GHashTable *state_buffer_table=NULL; +static GHashTable *state_buffer_table; static void diff --git a/epan/dissectors/packet-signal-pdu.c b/epan/dissectors/packet-signal-pdu.c index f846422677..0c808d7906 100644 --- a/epan/dissectors/packet-signal-pdu.c +++ b/epan/dissectors/packet-signal-pdu.c @@ -72,13 +72,13 @@ /* ID wireshark identifies the dissector by */ static int proto_signal_pdu; -static dissector_handle_t signal_pdu_handle_someip = NULL; -static dissector_handle_t signal_pdu_handle_can = NULL; -static dissector_handle_t signal_pdu_handle_flexray = NULL; -static dissector_handle_t signal_pdu_handle_lin = NULL; -static dissector_handle_t signal_pdu_handle_pdu_transport = NULL; -static dissector_handle_t signal_pdu_handle_ipdum = NULL; -static dissector_handle_t signal_pdu_handle_isobus = NULL; +static dissector_handle_t signal_pdu_handle_someip; +static dissector_handle_t signal_pdu_handle_can; +static dissector_handle_t signal_pdu_handle_flexray; +static dissector_handle_t signal_pdu_handle_lin; +static dissector_handle_t signal_pdu_handle_pdu_transport; +static dissector_handle_t signal_pdu_handle_ipdum; +static dissector_handle_t signal_pdu_handle_isobus; static int hf_pdu_name; static int hf_payload_unparsed; @@ -86,7 +86,7 @@ static int hf_payload_unparsed; static gint ett_spdu_payload; static gint ett_spdu_signal; static bool spdu_deserializer_activated = true; -static bool spdu_deserializer_show_hidden = false; +static bool spdu_deserializer_show_hidden; static bool spdu_deserializer_hide_raw_values = true; /*** expert info items ***/ @@ -95,30 +95,30 @@ static expert_field ei_spdu_config_error; static expert_field ei_spdu_unaligned_data; /*** Data Structure for UAT based config ***/ -static GHashTable *data_spdu_messages = NULL; - -static GHashTable *data_spdu_signal_list = NULL; -static GHashTable *data_spdu_signal_value_names = NULL; - -static GHashTable *data_spdu_someip_mappings = NULL; -static GHashTable *data_spdu_can_mappings = NULL; -static GHashTable *data_spdu_flexray_mappings = NULL; -static GHashTable *data_spdu_lin_mappings = NULL; -static GHashTable *data_spdu_pdu_transport_mappings = NULL; -static GHashTable *data_spdu_ipdum_mappings = NULL; -static GHashTable *data_spdu_dlt_mappings = NULL; -static GHashTable *data_spdu_uds_mappings = NULL; -static GHashTable *data_spdu_isobus_mappings = NULL; - -static hf_register_info *dynamic_hf_base_raw = NULL; -static hf_register_info *dynamic_hf_agg_sum = NULL; -static hf_register_info *dynamic_hf_agg_avg = NULL; -static hf_register_info *dynamic_hf_agg_int = NULL; -static guint dynamic_hf_number_of_entries = 0; -static guint dynamic_hf_base_raw_number = 0; -static guint dynamic_hf_agg_sum_number = 0; -static guint dynamic_hf_agg_avg_number = 0; -static guint dynamic_hf_agg_int_number = 0; +static GHashTable *data_spdu_messages; + +static GHashTable *data_spdu_signal_list; +static GHashTable *data_spdu_signal_value_names; + +static GHashTable *data_spdu_someip_mappings; +static GHashTable *data_spdu_can_mappings; +static GHashTable *data_spdu_flexray_mappings; +static GHashTable *data_spdu_lin_mappings; +static GHashTable *data_spdu_pdu_transport_mappings; +static GHashTable *data_spdu_ipdum_mappings; +static GHashTable *data_spdu_dlt_mappings; +static GHashTable *data_spdu_uds_mappings; +static GHashTable *data_spdu_isobus_mappings; + +static hf_register_info *dynamic_hf_base_raw; +static hf_register_info *dynamic_hf_agg_sum; +static hf_register_info *dynamic_hf_agg_avg; +static hf_register_info *dynamic_hf_agg_int; +static guint dynamic_hf_number_of_entries; +static guint dynamic_hf_base_raw_number; +static guint dynamic_hf_agg_sum_number; +static guint dynamic_hf_agg_avg_number; +static guint dynamic_hf_agg_int_number; #define HF_TYPE_BASE 0 #define HF_TYPE_RAW 1 @@ -326,41 +326,41 @@ typedef struct _spdu_isobus_mapping { typedef spdu_isobus_mapping_t spdu_isobus_mapping_uat_t; -static generic_one_id_string_t *spdu_message_ident = NULL; -static guint spdu_message_ident_num = 0; +static generic_one_id_string_t *spdu_message_ident; +static guint spdu_message_ident_num; -static spdu_signal_list_uat_t *spdu_signal_list = NULL; -static guint spdu_signal_list_num = 0; +static spdu_signal_list_uat_t *spdu_signal_list; +static guint spdu_signal_list_num; -static spdu_signal_value_name_uat_t *spdu_signal_value_names = NULL; -static guint spdu_parameter_value_names_num = 0; +static spdu_signal_value_name_uat_t *spdu_signal_value_names; +static guint spdu_parameter_value_names_num; -static spdu_someip_mapping_t *spdu_someip_mapping = NULL; -static guint spdu_someip_mapping_num = 0; +static spdu_someip_mapping_t *spdu_someip_mapping; +static guint spdu_someip_mapping_num; -static spdu_can_mapping_t *spdu_can_mapping = NULL; -static guint spdu_can_mapping_num = 0; +static spdu_can_mapping_t *spdu_can_mapping; +static guint spdu_can_mapping_num; -static spdu_flexray_mapping_t *spdu_flexray_mapping = NULL; -static guint spdu_flexray_mapping_num = 0; +static spdu_flexray_mapping_t *spdu_flexray_mapping; +static guint spdu_flexray_mapping_num; -static spdu_lin_mapping_t *spdu_lin_mapping = NULL; -static guint spdu_lin_mapping_num = 0; +static spdu_lin_mapping_t *spdu_lin_mapping; +static guint spdu_lin_mapping_num; -static spdu_pdu_transport_mapping_t *spdu_pdu_transport_mapping = NULL; -static guint spdu_pdu_transport_mapping_num = 0; +static spdu_pdu_transport_mapping_t *spdu_pdu_transport_mapping; +static guint spdu_pdu_transport_mapping_num; -static spdu_ipdum_mapping_t *spdu_ipdum_mapping = NULL; -static guint spdu_ipdum_mapping_num = 0; +static spdu_ipdum_mapping_t *spdu_ipdum_mapping; +static guint spdu_ipdum_mapping_num; -static spdu_dlt_mapping_t *spdu_dlt_mapping = NULL; -static guint spdu_dlt_mapping_num = 0; +static spdu_dlt_mapping_t *spdu_dlt_mapping; +static guint spdu_dlt_mapping_num; -static spdu_uds_mapping_t *spdu_uds_mapping = NULL; -static guint spdu_uds_mapping_num = 0; +static spdu_uds_mapping_t *spdu_uds_mapping; +static guint spdu_uds_mapping_num; -static spdu_isobus_mapping_t *spdu_isobus_mapping = NULL; -static guint spdu_isobus_mapping_num = 0; +static spdu_isobus_mapping_t *spdu_isobus_mapping; +static guint spdu_isobus_mapping_num; void proto_register_signal_pdu(void); void proto_reg_handoff_signal_pdu(void); @@ -2091,7 +2091,7 @@ typedef struct _spdu_aggregation { gdouble sum_time_value_products; } spdu_aggregation_t; -static wmem_map_t *spdu_aggregation_data = NULL; +static wmem_map_t *spdu_aggregation_data; static spdu_aggregation_t * get_or_create_aggregation_data(packet_info *pinfo, gint hf_id_effective) { diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 888a1163d5..3136c7017d 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -833,10 +833,10 @@ static guint sip_tls_port = TLS_PORT_SIP; /* global_sip_raw_text determines whether we are going to display */ /* the raw text of the SIP message, much like the MEGACO dissector does. */ -static bool global_sip_raw_text = false; +static bool global_sip_raw_text; /* global_sip_raw_text_without_crlf determines whether we are going to display */ /* the raw text of the SIP message with or without the '\r\n'. */ -static bool global_sip_raw_text_without_crlf = false; +static bool global_sip_raw_text_without_crlf; /* global_sip_raw_text_body_default_encoding determines what charset we are going to display the body */ static gint global_sip_raw_text_body_default_encoding = IANA_CS_UTF_8; /* strict_sip_version determines whether the SIP dissector enforces @@ -861,10 +861,10 @@ static bool sip_desegment_body = true; static bool sip_retrans_the_same_sport = true; /* whether we hold off tracking RTP conversations until an SDP answer is received */ -static bool sip_delay_sdp_changes = false; +static bool sip_delay_sdp_changes; /* Hide the generated Call IDs or not */ -static bool sip_hide_generatd_call_ids = false; +static bool sip_hide_generatd_call_ids; /* Extension header subdissectors */ static dissector_table_t ext_hdr_subdissector_table; @@ -1000,7 +1000,7 @@ UAT_CSTRING_CB_DEF(sip_custom_header_fields, header_name, header_field_t) UAT_CSTRING_CB_DEF(sip_custom_header_fields, header_desc, header_field_t) /* SIP authorization parameters */ -static bool global_sip_validate_authorization = false; +static bool global_sip_validate_authorization; typedef struct _authorization_user_t { gchar* username; @@ -1008,8 +1008,8 @@ typedef struct _authorization_user_t { gchar* password; } authorization_user_t; -static authorization_user_t* sip_authorization_users = NULL; -static guint sip_authorization_num_users = 0; +static authorization_user_t* sip_authorization_users; +static guint sip_authorization_num_users; static bool authorization_users_update_cb(void *r, char **err) @@ -1165,8 +1165,8 @@ static sip_info_value_t *stat_info; * maybe Via count as extra key to limit view to one hop) ****************************************************************************/ -static GHashTable *sip_hash = NULL; /* Hash table */ -static GHashTable *sip_headers_hash = NULL; /* Hash table */ +static GHashTable *sip_hash; /* Hash table */ +static GHashTable *sip_headers_hash; /* Hash table */ /* Types for hash table keys and values */ #define MAX_CALL_ID_SIZE 128 diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index 3523512efa..c43f858f45 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -2216,7 +2216,7 @@ static int skinny_tap; /* skinny protocol tap info */ #define MAX_SKINNY_MESSAGES_IN_PACKET 10 static skinny_info_t pi_arr[MAX_SKINNY_MESSAGES_IN_PACKET]; -static int pi_current = 0; +static int pi_current; static skinny_info_t *si; dissector_handle_t skinny_handle; diff --git a/epan/dissectors/packet-skinny.c.in b/epan/dissectors/packet-skinny.c.in index 5512dc4a26..0b91ad9cb9 100644 --- a/epan/dissectors/packet-skinny.c.in +++ b/epan/dissectors/packet-skinny.c.in @@ -175,7 +175,7 @@ static int skinny_tap; /* skinny protocol tap info */ #define MAX_SKINNY_MESSAGES_IN_PACKET 10 static skinny_info_t pi_arr[MAX_SKINNY_MESSAGES_IN_PACKET]; -static int pi_current = 0; +static int pi_current; static skinny_info_t *si; dissector_handle_t skinny_handle; diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c index c13ca91f46..12bc6dfb15 100644 --- a/epan/dissectors/packet-slsk.c +++ b/epan/dissectors/packet-slsk.c @@ -139,7 +139,7 @@ static bool slsk_desegment = true; #ifdef HAVE_ZLIB static bool slsk_decompress = true; #else -static bool slsk_decompress = false; +static bool slsk_decompress; #endif static const value_string slsk_tcp_msgs[] = { diff --git a/epan/dissectors/packet-smb-sidsnooping.c b/epan/dissectors/packet-smb-sidsnooping.c index 29e05f1729..a606b334db 100644 --- a/epan/dissectors/packet-smb-sidsnooping.c +++ b/epan/dissectors/packet-smb-sidsnooping.c @@ -35,14 +35,14 @@ static int hf_samr_acct_name; static int hf_samr_level; -GHashTable *sid_name_table = NULL; +GHashTable *sid_name_table; -static GHashTable *ctx_handle_table = NULL; +static GHashTable *ctx_handle_table; -static gboolean lsa_policy_information_tap_installed = FALSE; -static gboolean samr_query_dispinfo_tap_installed = FALSE; +static gboolean lsa_policy_information_tap_installed; +static gboolean samr_query_dispinfo_tap_installed; const char * diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 0fb8c7a0dc..3037cf16ef 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -897,7 +897,7 @@ static const fragment_items smb_frag_items = { "segments" }; -static proto_tree *top_tree_global = NULL; /* ugly */ +static proto_tree *top_tree_global; /* ugly */ static int dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *smb_tree, guint8 cmd, gboolean first_pdu, smb_info_t *si); @@ -1022,7 +1022,7 @@ typedef struct _active_file { } active_file ; /* This is the GSList that will contain all the files that we are tracking */ -static GSList *GSL_active_files = NULL; +static GSList *GSL_active_files; /* We define a free chunk in a file as an start offset and end offset Consider a free chunk as a "hole" in a file that we are capturing */ @@ -1477,8 +1477,8 @@ smb_eo_cleanup(void) offset += len; \ *bcp -= len; -bool sid_display_hex = false; -bool sid_name_snooping = false; +bool sid_display_hex; +bool sid_name_snooping; /* ExportObject preferences variable */ bool eosmb_take_name_as_fid = false ; @@ -1712,7 +1712,7 @@ smb_saved_info_hash_matched(gconstpointer k) return key->frame + key->pid_mid; } -static GSList *conv_tables = NULL; +static GSList *conv_tables; static gint smb_find_unicode_null_offset(tvbuff_t *tvb, gint offset, const gint maxlength, const guint16 needle, const guint encoding) diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index a6ccf36356..5ff2097bc6 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -103,7 +103,7 @@ void proto_reg_handoff_smb2(void); #define SMB2_ENCR_HEADER 0xFD #define SMB2_COMP_HEADER 0xFC -static wmem_map_t *smb2_sessions = NULL; +static wmem_map_t *smb2_sessions; static const char smb_header_label[] = "SMB2 Header"; static const char smb_transform_header_label[] = "SMB2 Transform Header"; @@ -819,9 +819,9 @@ static expert_field ei_smb2_invalid_signature; static int smb2_tap; static int smb2_eo_tap; -static dissector_handle_t gssapi_handle = NULL; -static dissector_handle_t ntlmssp_handle = NULL; -static dissector_handle_t rsvd_handle = NULL; +static dissector_handle_t gssapi_handle; +static dissector_handle_t ntlmssp_handle; +static dissector_handle_t rsvd_handle; static heur_dissector_list_t smb2_pipe_subdissector_list; @@ -1378,8 +1378,8 @@ typedef struct _smb2_seskey_field_t { guint c2skey_len; } smb2_seskey_field_t; -static smb2_seskey_field_t *seskey_list = NULL; -static guint num_seskey_list = 0; +static smb2_seskey_field_t *seskey_list; +static guint num_seskey_list; static const gint8 zeros[NTLMSSP_KEY_LEN] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; @@ -6542,7 +6542,7 @@ smb2_pipe_set_file_id(packet_info *pinfo, smb2_info_t *si) } static bool smb2_pipe_reassembly = true; -static bool smb2_verify_signatures = false; +static bool smb2_verify_signatures; static reassembly_table smb2_pipe_reassembly_table; static int diff --git a/epan/dissectors/packet-sml.c b/epan/dissectors/packet-sml.c index a4364d47d4..3a5a2742ed 100644 --- a/epan/dissectors/packet-sml.c +++ b/epan/dissectors/packet-sml.c @@ -389,7 +389,7 @@ static expert_field ei_sml_cosemvalue_invalid; /*options*/ static bool sml_reassemble = true; -static bool sml_crc_enabled = false; +static bool sml_crc_enabled; /*get number of length octets and calculate how many data octets, it's like BER but not the same! */ static void get_length(tvbuff_t *tvb, guint *offset, guint *data, guint *length){ diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c index b53aa48c0c..09a2671c16 100644 --- a/epan/dissectors/packet-smtp.c +++ b/epan/dissectors/packet-smtp.c @@ -81,7 +81,7 @@ static gint ett_smtp_data_fragments; static expert_field ei_smtp_base64_decode; static expert_field ei_smtp_rsp_code; -static bool smtp_auth_parameter_decoding_enabled = false; +static bool smtp_auth_parameter_decoding_enabled; /* desegmentation of SMTP command and response lines */ static bool smtp_desegment = true; static bool smtp_data_desegment = true; diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index a5f980ec48..a54136c96c 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -152,10 +152,10 @@ static snmp_usm_decoder_t priv_protos[] = { snmp_usm_priv_aes256 }; -static snmp_ue_assoc_t* ueas = NULL; -static guint num_ueas = 0; -static snmp_ue_assoc_t* localized_ues = NULL; -static snmp_ue_assoc_t* unlocalized_ues = NULL; +static snmp_ue_assoc_t* ueas; +static guint num_ueas; +static snmp_ue_assoc_t* localized_ues; +static snmp_ue_assoc_t* unlocalized_ues; /****/ /* Variables used for handling enterprise specific trap types */ @@ -164,14 +164,14 @@ typedef struct _snmp_st_assoc_t { guint trap; char *desc; } snmp_st_assoc_t; -static guint num_specific_traps = 0; -static snmp_st_assoc_t *specific_traps = NULL; -static const char *enterprise_oid = NULL; -static guint generic_trap = 0; -static guint32 snmp_version = 0; +static guint num_specific_traps; +static snmp_st_assoc_t *specific_traps; +static const char *enterprise_oid; +static guint generic_trap; +static guint32 snmp_version; static guint32 RequestID = -1; -static snmp_usm_params_t usm_p = {FALSE,FALSE,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,FALSE}; +static snmp_usm_params_t usm_p; #define TH_AUTH 0x01 #define TH_CRYPT 0x02 diff --git a/epan/dissectors/packet-snort.c b/epan/dissectors/packet-snort.c index feb3e33c82..3afcc9ac4a 100644 --- a/epan/dissectors/packet-snort.c +++ b/epan/dissectors/packet-snort.c @@ -119,13 +119,13 @@ static const char *pref_snort_config_filename = "C:\\Snort\\etc\\snort.conf"; #endif /* Should rule stats be shown in protocol tree? */ -static bool snort_show_rule_stats = false; +static bool snort_show_rule_stats; /* Should alerts be added as expert info? */ -static bool snort_show_alert_expert_info = false; +static bool snort_show_alert_expert_info; /* Should we try to attach the alert to the tcp.reassembled_in frame instead of current one? */ -static bool snort_alert_in_reassembled_frame = false; +static bool snort_alert_in_reassembled_frame; /* Should Snort ignore checksum errors (as will likely be seen because of check offloading or * possibly if trying to capture live in a container)? */ @@ -134,7 +134,7 @@ static bool snort_ignore_checksum_errors = true; /********************************************************/ /* Global variable with single parsed snort config */ -static SnortConfig_t *g_snort_config = NULL; +static SnortConfig_t *g_snort_config; /******************************************************/ diff --git a/epan/dissectors/packet-socketcan.c b/epan/dissectors/packet-socketcan.c index 4e63f65a24..b34e460cdd 100644 --- a/epan/dissectors/packet-socketcan.c +++ b/epan/dissectors/packet-socketcan.c @@ -97,8 +97,8 @@ static int proto_can; static int proto_canfd; static int proto_canxl; -static bool byte_swap = false; -static bool heuristic_first = false; +static bool byte_swap; +static bool heuristic_first; static heur_dissector_list_t heur_subdissector_list; static heur_dtbl_entry_t *heur_dtbl_entry; @@ -116,10 +116,10 @@ static heur_dtbl_entry_t *heur_dtbl_entry; #define CANXL_LEN_OFFSET 6 #define CANXL_DATA_OFFSET 12 -static dissector_table_t can_id_dissector_table = NULL; -static dissector_table_t can_extended_id_dissector_table = NULL; -static dissector_table_t subdissector_table = NULL; -static dissector_table_t canxl_sdu_type_dissector_table = NULL; +static dissector_table_t can_id_dissector_table; +static dissector_table_t can_extended_id_dissector_table; +static dissector_table_t subdissector_table; +static dissector_table_t canxl_sdu_type_dissector_table; static dissector_handle_t socketcan_classic_handle; static dissector_handle_t socketcan_fd_handle; static dissector_handle_t socketcan_xl_handle; @@ -196,10 +196,10 @@ typedef struct _interface_config { #define DATAFILE_CAN_INTERFACE_MAPPING "CAN_interface_mapping" -static GHashTable *data_can_interfaces_by_id = NULL; -static GHashTable *data_can_interfaces_by_name = NULL; -static interface_config_t *interface_configs = NULL; -static guint interface_config_num = 0; +static GHashTable *data_can_interfaces_by_id; +static GHashTable *data_can_interfaces_by_name; +static interface_config_t *interface_configs; +static guint interface_config_num; UAT_HEX_CB_DEF(interface_configs, interface_id, interface_config_t) UAT_CSTRING_CB_DEF(interface_configs, interface_name, interface_config_t) @@ -366,9 +366,9 @@ typedef struct _sender_receiver_config { #define DATAFILE_CAN_SENDER_RECEIVER "CAN_senders_receivers" -static GHashTable *data_sender_receiver = NULL; -static sender_receiver_config_t *sender_receiver_configs = NULL; -static guint sender_receiver_config_num = 0; +static GHashTable *data_sender_receiver; +static sender_receiver_config_t *sender_receiver_configs; +static guint sender_receiver_config_num; UAT_HEX_CB_DEF(sender_receiver_configs, bus_id, sender_receiver_config_t) UAT_HEX_CB_DEF(sender_receiver_configs, can_id, sender_receiver_config_t) diff --git a/epan/dissectors/packet-solaredge.c b/epan/dissectors/packet-solaredge.c index 9383734256..51747e639c 100644 --- a/epan/dissectors/packet-solaredge.c +++ b/epan/dissectors/packet-solaredge.c @@ -978,7 +978,7 @@ static const value_string solaredge_data_devicetypes[] = { }; static gcry_cipher_hd_t cipher_hd_system; -static const gchar *global_system_encryption_key = NULL; +static const gchar *global_system_encryption_key; static guint16 calculate_crc(t_solaredge_packet_header *header, const guint8 *data, gint length) diff --git a/epan/dissectors/packet-someip-sd.c b/epan/dissectors/packet-someip-sd.c index 7392d25fda..0714fb5222 100644 --- a/epan/dissectors/packet-someip-sd.c +++ b/epan/dissectors/packet-someip-sd.c @@ -175,8 +175,8 @@ static int st_node_ip_src = -1; static int st_node_ip_dst = -1; /*** Preferences ***/ -static range_t *someip_ignore_ports_udp = NULL; -static range_t *someip_ignore_ports_tcp = NULL; +static range_t *someip_ignore_ports_udp; +static range_t *someip_ignore_ports_tcp; /* SOME/IP-SD Entry Names for TTL>0 */ static const value_string sd_entry_type_positive[] = { diff --git a/epan/dissectors/packet-someip.c b/epan/dissectors/packet-someip.c index 5d964de354..9886c1847b 100644 --- a/epan/dissectors/packet-someip.c +++ b/epan/dissectors/packet-someip.c @@ -127,11 +127,11 @@ /* ID wireshark identifies the dissector by */ static int proto_someip; -static module_t *someip_module = NULL; +static module_t *someip_module; -static dissector_handle_t someip_handle_udp = NULL; -static dissector_handle_t someip_handle_tcp = NULL; -static dissector_handle_t dtls_handle = NULL; +static dissector_handle_t someip_handle_udp; +static dissector_handle_t someip_handle_tcp; +static dissector_handle_t dtls_handle; /* header field */ static int hf_someip_messageid; @@ -165,7 +165,7 @@ static gint ett_someip_msgtype; static gint ett_someip_tp; /* dissector handling */ -static dissector_table_t someip_dissector_table = NULL; +static dissector_table_t someip_dissector_table; /* message reassembly for SOME/IP-TP */ static int hf_someip_tp_fragments; @@ -198,14 +198,14 @@ static int hf_payload_wtlv_tag_res; static int hf_payload_wtlv_tag_wire_type; static int hf_payload_wtlv_tag_data_id; -static hf_register_info* dynamic_hf_param = NULL; -static guint dynamic_hf_param_size = 0; -static hf_register_info* dynamic_hf_array = NULL; -static guint dynamic_hf_array_size = 0; -static hf_register_info* dynamic_hf_struct = NULL; -static guint dynamic_hf_struct_size = 0; -static hf_register_info* dynamic_hf_union = NULL; -static guint dynamic_hf_union_size = 0; +static hf_register_info* dynamic_hf_param; +static guint dynamic_hf_param_size; +static hf_register_info* dynamic_hf_array; +static guint dynamic_hf_array_size; +static hf_register_info* dynamic_hf_struct; +static guint dynamic_hf_struct_size; +static hf_register_info* dynamic_hf_union; +static guint dynamic_hf_union_size; static gint ett_someip_tp_fragment; static gint ett_someip_tp_fragments; @@ -237,8 +237,8 @@ static const fragment_items someip_tp_frag_items = { static bool someip_tp_reassemble = true; static bool someip_deserializer_activated = true; -static bool someip_deserializer_wtlv_default = false; -static bool someip_detect_dtls = false; +static bool someip_deserializer_wtlv_default; +static bool someip_detect_dtls; /* SOME/IP Message Types */ static const value_string someip_msg_type[] = { @@ -284,19 +284,19 @@ static expert_field ei_someip_payload_static_array_min_not_max; static expert_field ei_someip_payload_dyn_array_not_within_limit; /*** Data Structure for mapping IDs to Names (Services, Methods, ...) ***/ -static GHashTable *data_someip_services = NULL; -static GHashTable *data_someip_methods = NULL; -static GHashTable *data_someip_eventgroups = NULL; -static GHashTable *data_someip_clients = NULL; - -static GHashTable *data_someip_parameter_list = NULL; -static GHashTable *data_someip_parameter_base_type_list = NULL; -static GHashTable *data_someip_parameter_strings = NULL; -static GHashTable *data_someip_parameter_typedefs = NULL; -static GHashTable *data_someip_parameter_arrays = NULL; -static GHashTable *data_someip_parameter_structs = NULL; -static GHashTable *data_someip_parameter_unions = NULL; -static GHashTable *data_someip_parameter_enums = NULL; +static GHashTable *data_someip_services; +static GHashTable *data_someip_methods; +static GHashTable *data_someip_eventgroups; +static GHashTable *data_someip_clients; + +static GHashTable *data_someip_parameter_list; +static GHashTable *data_someip_parameter_base_type_list; +static GHashTable *data_someip_parameter_strings; +static GHashTable *data_someip_parameter_typedefs; +static GHashTable *data_someip_parameter_arrays; +static GHashTable *data_someip_parameter_structs; +static GHashTable *data_someip_parameter_unions; +static GHashTable *data_someip_parameter_enums; /*** Taps ***/ static int tap_someip_messages = -1; @@ -571,41 +571,41 @@ typedef struct _generic_two_id_string { gchar *name; } generic_two_id_string_t; -static generic_one_id_string_t *someip_service_ident = NULL; -static guint someip_service_ident_num = 0; +static generic_one_id_string_t *someip_service_ident; +static guint someip_service_ident_num; -static generic_two_id_string_t *someip_method_ident = NULL; -static guint someip_method_ident_num = 0; +static generic_two_id_string_t *someip_method_ident; +static guint someip_method_ident_num; -static generic_two_id_string_t *someip_eventgroup_ident = NULL; -static guint someip_eventgroup_ident_num = 0; +static generic_two_id_string_t *someip_eventgroup_ident; +static guint someip_eventgroup_ident_num; -static generic_two_id_string_t *someip_client_ident = NULL; -static guint someip_client_ident_num = 0; +static generic_two_id_string_t *someip_client_ident; +static guint someip_client_ident_num; -static someip_parameter_list_uat_t *someip_parameter_list = NULL; -static guint someip_parameter_list_num = 0; +static someip_parameter_list_uat_t *someip_parameter_list; +static guint someip_parameter_list_num; -static someip_parameter_string_uat_t *someip_parameter_strings = NULL; -static guint someip_parameter_strings_num = 0; +static someip_parameter_string_uat_t *someip_parameter_strings; +static guint someip_parameter_strings_num; -static someip_parameter_typedef_uat_t *someip_parameter_typedefs = NULL; -static guint someip_parameter_typedefs_num = 0; +static someip_parameter_typedef_uat_t *someip_parameter_typedefs; +static guint someip_parameter_typedefs_num; -static someip_parameter_array_uat_t *someip_parameter_arrays = NULL; -static guint someip_parameter_arrays_num = 0; +static someip_parameter_array_uat_t *someip_parameter_arrays; +static guint someip_parameter_arrays_num; -static someip_parameter_struct_uat_t *someip_parameter_structs = NULL; -static guint someip_parameter_structs_num = 0; +static someip_parameter_struct_uat_t *someip_parameter_structs; +static guint someip_parameter_structs_num; -static someip_parameter_union_uat_t *someip_parameter_unions = NULL; -static guint someip_parameter_unions_num = 0; +static someip_parameter_union_uat_t *someip_parameter_unions; +static guint someip_parameter_unions_num; -static someip_parameter_enum_uat_t *someip_parameter_enums = NULL; -static guint someip_parameter_enums_num = 0; +static someip_parameter_enum_uat_t *someip_parameter_enums; +static guint someip_parameter_enums_num; -static someip_parameter_base_type_list_uat_t *someip_parameter_base_type_list = NULL; -static guint someip_parameter_base_type_list_num = 0; +static someip_parameter_base_type_list_uat_t *someip_parameter_base_type_list; +static guint someip_parameter_base_type_list_num; void proto_register_someip(void); void proto_reg_handoff_someip(void); diff --git a/epan/dissectors/packet-sparkplug.c b/epan/dissectors/packet-sparkplug.c index 1eb57d27c3..6dff1a589f 100644 --- a/epan/dissectors/packet-sparkplug.c +++ b/epan/dissectors/packet-sparkplug.c @@ -37,7 +37,7 @@ static gint ett_sparkplugb; static gint ett_sparkplugb_namespace; /* The handle to the protobuf dissector */ -dissector_handle_t protobuf_handle = NULL; +dissector_handle_t protobuf_handle; /* The hf items */ static int hf_sparkplugb_namespace; diff --git a/epan/dissectors/packet-spdy.c b/epan/dissectors/packet-spdy.c index 9e55c081d1..e7f2c626f1 100644 --- a/epan/dissectors/packet-spdy.c +++ b/epan/dissectors/packet-spdy.c @@ -242,8 +242,8 @@ static bool spdy_assemble_entity_bodies = true; static bool spdy_decompress_body = true; static bool spdy_decompress_headers = true; #else -static bool spdy_decompress_body = false; -static bool spdy_decompress_headers = false; +static bool spdy_decompress_body; +static bool spdy_decompress_headers; #endif #ifdef HAVE_ZLIB diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c index f73078a8a1..fe94a0a9c9 100644 --- a/epan/dissectors/packet-spnego.c +++ b/epan/dissectors/packet-spnego.c @@ -95,7 +95,7 @@ static int hf_spnego_ContextFlags_integFlag; /* Global variables */ static const char *MechType_oid; gssapi_oid_value *next_level_value; -gboolean saw_mechanism = FALSE; +gboolean saw_mechanism; /* Initialize the subtree pointers */ diff --git a/epan/dissectors/packet-ssh.c b/epan/dissectors/packet-ssh.c index 9a19885c96..205c90454e 100644 --- a/epan/dissectors/packet-ssh.c +++ b/epan/dissectors/packet-ssh.c @@ -225,7 +225,7 @@ typedef struct { ssh_bignum *key_material; } ssh_key_map_entry_t; -static GHashTable * ssh_master_key_map = NULL; +static GHashTable * ssh_master_key_map; static int proto_ssh; @@ -439,7 +439,7 @@ static expert_field ei_ssh_mac_bad; static bool ssh_desegment = true; static dissector_handle_t ssh_handle; -static dissector_handle_t sftp_handle=NULL; +static dissector_handle_t sftp_handle; static const char *pref_keylog_file; static FILE *ssh_keylog_file; @@ -466,7 +466,7 @@ static const fragment_items ssh_segment_items = { #define SSH_DECRYPT_DEBUG #ifdef SSH_DECRYPT_DEBUG -static const gchar *ssh_debug_file_name = NULL; +static const gchar *ssh_debug_file_name; #endif #define TCP_RANGE_SSH "22" @@ -4869,7 +4869,7 @@ ssh_dissect_public_key_signature(tvbuff_t *packet_tvb, packet_info *pinfo, #ifdef SSH_DECRYPT_DEBUG /* {{{ */ -static FILE* ssh_debug_file=NULL; +static FILE* ssh_debug_file; static void ssh_prefs_apply_cb(void) diff --git a/epan/dissectors/packet-sstp.c b/epan/dissectors/packet-sstp.c index 3c1e27a89e..296ae9da57 100644 --- a/epan/dissectors/packet-sstp.c +++ b/epan/dissectors/packet-sstp.c @@ -102,7 +102,7 @@ void proto_reg_handoff_sstp(void); #define SSTP_ATTRIB_STATUS_UNRECOGNIZED_ATTRIBUTE 0x000002 #define SSTP_ATTRIB_STATUS_VALUE_NOT_SUPPORTED 0x000004 -static dissector_handle_t ppp_hdlc_handle = NULL; +static dissector_handle_t ppp_hdlc_handle; static gint ett_sstp; static gint ett_sstp_attribute; static gint ett_sstp_version; diff --git a/epan/dissectors/packet-stt.c b/epan/dissectors/packet-stt.c index 825206fe84..fc01a04e95 100644 --- a/epan/dissectors/packet-stt.c +++ b/epan/dissectors/packet-stt.c @@ -26,7 +26,7 @@ #include "packet-ip.h" static bool pref_reassemble = true; -static bool pref_check_checksum = false; +static bool pref_check_checksum; /* IANA ref: * https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c index 2e542a068d..80aa825b64 100644 --- a/epan/dissectors/packet-sua.c +++ b/epan/dissectors/packet-sua.c @@ -389,7 +389,7 @@ typedef struct _sua_assoc_info_t { gboolean has_fw_key; } sua_assoc_info_t; -static wmem_tree_t* assocs = NULL; +static wmem_tree_t* assocs; static sua_assoc_info_t* assoc; static sua_assoc_info_t no_sua_assoc = { 0, /* assoc_id */ @@ -548,7 +548,7 @@ typedef enum { } Version_Type; static gint version = SUA_RFC; -static bool set_addresses = false; +static bool set_addresses; static void dissect_parameters(tvbuff_t *tlv_tvb, packet_info *pinfo, proto_tree *tree, tvbuff_t **data_tvb, guint8 *source_ssn, guint8 *dest_ssn); diff --git a/epan/dissectors/packet-sv.c b/epan/dissectors/packet-sv.c index 350b694c13..67fda192cf 100644 --- a/epan/dissectors/packet-sv.c +++ b/epan/dissectors/packet-sv.c @@ -128,7 +128,7 @@ static expert_field ei_sv_mal_utctime; static expert_field ei_sv_zero_pdu; static expert_field ei_sv_mal_gmidentity; -static bool sv_decode_data_as_phsmeas = false; +static bool sv_decode_data_as_phsmeas; static dissector_handle_t sv_handle; diff --git a/epan/dissectors/packet-sysdig-event.c b/epan/dissectors/packet-sysdig-event.c index be3b76cc75..2eaab80e92 100644 --- a/epan/dissectors/packet-sysdig-event.c +++ b/epan/dissectors/packet-sysdig-event.c @@ -300,8 +300,8 @@ static gint ett_sysdig_parm_lens; static gint ett_sysdig_syscall; /* Initialize the pointer to the child plugin dissector */ -static dissector_handle_t sinsp_dissector_handle = NULL; -static dissector_handle_t elf_dissector_handle = NULL; +static dissector_handle_t sinsp_dissector_handle; +static dissector_handle_t elf_dissector_handle; #define SYSDIG_EVENT_MIN_LENGTH 8 /* XXX Fix */ diff --git a/epan/dissectors/packet-systemd-journal.c b/epan/dissectors/packet-systemd-journal.c index 2b784cf569..766988a4fb 100644 --- a/epan/dissectors/packet-systemd-journal.c +++ b/epan/dissectors/packet-systemd-journal.c @@ -161,7 +161,7 @@ static expert_field ei_unhandled_field_type; static expert_field ei_nonbinary_field; static expert_field ei_undecoded_field; -static dissector_handle_t sje_handle = NULL; +static dissector_handle_t sje_handle; #define MAX_DATA_SIZE 262144 // WTAP_MAX_PACKET_SIZE_STANDARD. Increase if needed. diff --git a/epan/dissectors/packet-t124.c b/epan/dissectors/packet-t124.c index 59b0130c5f..35af6f546a 100644 --- a/epan/dissectors/packet-t124.c +++ b/epan/dissectors/packet-t124.c @@ -40,7 +40,7 @@ void proto_reg_handoff_t124(void); /* Initialize the protocol and registered fields */ static int proto_t124; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static int hf_t124_object; /* T_object */ static int hf_t124_h221NonStandard; /* H221NonStandardIdentifier */ @@ -276,8 +276,8 @@ static int hf_t124_DomainMCSPDU_PDU; static guint32 channelId = -1; -static dissector_table_t t124_ns_dissector_table=NULL; -static dissector_table_t t124_sd_dissector_table=NULL; +static dissector_table_t t124_ns_dissector_table; +static dissector_table_t t124_sd_dissector_table; static gint ett_t124_Key; static gint ett_t124_NonStandardParameter; diff --git a/epan/dissectors/packet-t125.c b/epan/dissectors/packet-t125.c index 5838bcec0f..d42712f947 100644 --- a/epan/dissectors/packet-t125.c +++ b/epan/dissectors/packet-t125.c @@ -45,7 +45,7 @@ void proto_reg_handoff_t125(void); /* Initialize the protocol and registered fields */ static int proto_t125; -static proto_tree *top_tree = NULL; +static proto_tree *top_tree; static int hf_t125_ConnectMCSPDU_PDU; /* ConnectMCSPDU */ static int hf_t125_maxChannelIds; /* INTEGER_0_MAX */ static int hf_t125_maxUserIds; /* INTEGER_0_MAX */ diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index 99c0fbbda4..f81bf3ae10 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -64,7 +64,7 @@ static bool use_pre_corrigendum_asn1_specification = true; /* instead of as T.38. This may result in that some T.38 UPTL */ /* packets with sequence number values higher than 32767 may be */ /* shown as RTP packets. */ -static bool dissect_possible_rtpv2_packets_as_rtp = false; +static bool dissect_possible_rtpv2_packets_as_rtp; /* Reassembly of T.38 PDUs over TPKT over TCP */ @@ -160,7 +160,7 @@ static gint ett_data_fragments; static expert_field ei_t38_malformed; static gboolean primary_part = TRUE; -static guint32 seq_number = 0; +static guint32 seq_number; /* Tables for reassembly of Data fragments. */ static reassembly_table data_reassembly_table; @@ -194,11 +194,11 @@ typedef struct _fragment_key { guint32 id; } fragment_key; -static conversation_t *p_conv= NULL; -static t38_conv *p_t38_conv = NULL; -static t38_conv *p_t38_packet_conv = NULL; -static t38_conv_info *p_t38_conv_info = NULL; -static t38_conv_info *p_t38_packet_conv_info = NULL; +static conversation_t *p_conv; +static t38_conv *p_t38_conv; +static t38_conv *p_t38_packet_conv; +static t38_conv_info *p_t38_conv_info; +static t38_conv_info *p_t38_packet_conv_info; /* RTP Version is the first 2 bits of the first octet in the UDP payload*/ #define RTP_VERSION(octet) ((octet) >> 6) @@ -214,7 +214,7 @@ static bool global_t38_show_setup_info = true; #define MAX_T38_MESSAGES_IN_PACKET 4 static t38_packet_info t38_info_arr[MAX_T38_MESSAGES_IN_PACKET]; static int t38_info_current=0; -static t38_packet_info *t38_info=NULL; +static t38_packet_info *t38_info; /* Set up an T38 conversation */ diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c index 4abfd22d90..a6e6cc0005 100644 --- a/epan/dissectors/packet-tacacs.c +++ b/epan/dissectors/packet-tacacs.c @@ -65,7 +65,7 @@ static gint ett_tacacs; static bool tacplus_preference_desegment = true; static const char *tacplus_opt_key; -static GSList *tacplus_keys = NULL; +static GSList *tacplus_keys; #define ADDR_INVLD "invalid" diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c index 4f8f7a0259..ade6b7048c 100644 --- a/epan/dissectors/packet-tcap.c +++ b/epan/dissectors/packet-tcap.c @@ -128,11 +128,11 @@ gint ett_tcap_stat; static struct tcapsrt_info_t * gp_tcapsrt_info; static gboolean tcap_subdissector_used=FALSE; -static dissector_handle_t requested_subdissector_handle = NULL; +static dissector_handle_t requested_subdissector_handle; static int ss7pc_address_type = -1; -static struct tcaphash_context_t * gp_tcap_context=NULL; +static struct tcaphash_context_t * gp_tcap_context; static gint ett_tcap_ExternalPDU_U; static gint ett_tcap_TCMessage; @@ -188,20 +188,20 @@ gboolean gtcap_DisplaySRT=FALSE; gboolean gtcap_StatSRT=FALSE; /* Global hash tables*/ -static wmem_map_t *tcaphash_context = NULL; -static wmem_map_t *tcaphash_begin = NULL; -static wmem_map_t *tcaphash_cont = NULL; -static wmem_map_t *tcaphash_end = NULL; -static wmem_map_t *tcaphash_ansi = NULL; +static wmem_map_t *tcaphash_context; +static wmem_map_t *tcaphash_begin; +static wmem_map_t *tcaphash_cont; +static wmem_map_t *tcaphash_end; +static wmem_map_t *tcaphash_ansi; static guint32 tcapsrt_global_SessionId=1; -static dissector_handle_t tcap_handle = NULL; +static dissector_handle_t tcap_handle; static dissector_table_t ber_oid_dissector_table; static const char * cur_oid; static const char * tcapext_oid; -static proto_tree * tcap_top_tree=NULL; -static proto_tree * tcap_stat_tree=NULL; +static proto_tree * tcap_top_tree; +static proto_tree * tcap_stat_tree; static dissector_handle_t data_handle; static dissector_handle_t ansi_tcap_handle; @@ -209,8 +209,8 @@ static dissector_handle_t ansi_tcap_handle; static int dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset); static bool dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_); -static dissector_table_t ansi_sub_dissectors = NULL; -static dissector_table_t itu_sub_dissectors = NULL; +static dissector_table_t ansi_sub_dissectors; +static dissector_table_t itu_sub_dissectors; extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) { dissector_add_uint("ansi_tcap.ssn",ssn,dissector); diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 6836d7501f..313ad008b4 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -72,7 +72,7 @@ static inline guint64 KEEP_32MSB_OF_GUINT64(guint64 nb) { * packet to the capture program but a checksummed packet got put onto * the wire. */ -static bool tcp_check_checksum = false; +static bool tcp_check_checksum; /* * Window scaling values to be used when not known (set as a preference) */ @@ -502,7 +502,7 @@ static bool tcp_no_subdissector_on_error = true; /* Enable buffering of out-of-order TCP segments before passing it to a * subdissector (depends on "tcp_desegment"). */ -static bool tcp_reassemble_out_of_order = false; +static bool tcp_reassemble_out_of_order; /* * FF: https://www.rfc-editor.org/rfc/rfc6994.html @@ -524,10 +524,10 @@ static bool tcp_exp_options_rfc6994 = true; static bool tcp_fastrt_precedence = true; /* Process info, currently discovered via IPFIX */ -static bool tcp_display_process_info = false; +static bool tcp_display_process_info; /* Read the sequence number as syn cookie */ -static bool read_seq_as_syn_cookie = false; +static bool read_seq_as_syn_cookie; /* * TCP option @@ -749,7 +749,7 @@ static guint32 mptcp_stream_count; * Maps an MPTCP token to a mptcp_analysis structure * Collisions are not handled */ -static wmem_tree_t *mptcp_tokens = NULL; +static wmem_tree_t *mptcp_tokens; static int * const tcp_option_mptcp_capable_v0_flags[] = { &hf_tcp_option_mptcp_checksum_flag, @@ -1670,13 +1670,13 @@ static void conversation_completeness_fill(gchar *buf, guint32 value) static bool tcp_analyze_seq = true; static bool tcp_relative_seq = true; static bool tcp_track_bytes_in_flight = true; -static bool tcp_bif_seq_based = false; +static bool tcp_bif_seq_based; static bool tcp_calculate_ts = true; static bool tcp_analyze_mptcp = true; static bool mptcp_relative_seq = true; -static bool mptcp_analyze_mappings = false; -static bool mptcp_intersubflows_retransmission = false; +static bool mptcp_analyze_mappings; +static bool mptcp_intersubflows_retransmission; #define TCP_A_RETRANSMISSION 0x0001 @@ -5810,7 +5810,7 @@ dissect_tcpopt_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d } /* If set, do not put the TCP timestamp information on the summary line */ -static bool tcp_ignore_timestamps = false; +static bool tcp_ignore_timestamps; static int dissect_tcpopt_timestamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) @@ -7417,7 +7417,7 @@ tcp_dissect_options(tvbuff_t *tvb, int offset, guint length, This has been separated into a stand alone routine to other protocol dissectors can call to it, e.g., SOCKS. */ -static bool try_heuristic_first = false; +static bool try_heuristic_first; /* this function can be called with tcpd==NULL as from the msproxy dissector */ diff --git a/epan/dissectors/packet-tcpcl.c b/epan/dissectors/packet-tcpcl.c index a17ff4c7bd..1849453c75 100644 --- a/epan/dissectors/packet-tcpcl.c +++ b/epan/dissectors/packet-tcpcl.c @@ -89,13 +89,13 @@ static bool tcpcl_decode_bundle = true; static reassembly_table xfer_reassembly_table; /// Dissector handles -static dissector_handle_t tcpcl_handle = NULL; -static dissector_handle_t tls_handle = NULL; -static dissector_handle_t bundle_handle = NULL; +static dissector_handle_t tcpcl_handle; +static dissector_handle_t tls_handle; +static dissector_handle_t bundle_handle; /// Extension sub-dissectors -static dissector_table_t sess_ext_dissectors = NULL; -static dissector_table_t xfer_ext_dissectors = NULL; +static dissector_table_t sess_ext_dissectors; +static dissector_table_t xfer_ext_dissectors; static const value_string v3_message_type_vals[] = { {((TCPCLV3_DATA_SEGMENT>>4) & 0x0F), "DATA_SEGMENT"}, diff --git a/epan/dissectors/packet-tdmop.c b/epan/dissectors/packet-tdmop.c index c1d4884f13..471f29d3f4 100644 --- a/epan/dissectors/packet-tdmop.c +++ b/epan/dissectors/packet-tdmop.c @@ -46,7 +46,7 @@ static int hf_tdmop_Reserved; static int hf_tdmop_payload; static int hf_tdmop_Compression_mask; -static dissector_handle_t lapd_handle = NULL; +static dissector_handle_t lapd_handle; static gint pref_tdmop_d_channel = 16; static guint32 pref_tdmop_mask = 0xFFFFFFFFUL; diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index cdb5b14213..c0c90d1eea 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -1457,7 +1457,7 @@ static const enum_val_t tds_endian_type_options[] = { }; /* TCP port preferences for TDS decode */ -static range_t *tds_tcp_ports = NULL; +static range_t *tds_tcp_ports; /* These correspond to the netlib packet type field */ static const value_string packet_type_names[] = { diff --git a/epan/dissectors/packet-tecmp.c b/epan/dissectors/packet-tecmp.c index 2d43966478..eb2f5e5a90 100644 --- a/epan/dissectors/packet-tecmp.c +++ b/epan/dissectors/packet-tecmp.c @@ -46,9 +46,9 @@ static int proto_tecmp_payload; static dissector_handle_t eth_handle; static int proto_vlan; -static bool heuristic_first = false; +static bool heuristic_first; static bool analog_samples_are_signed_int = true; -static bool show_ethernet_in_tecmp_tree = false; +static bool show_ethernet_in_tecmp_tree; static bool detect_asam_cmp = true; static bool detect_asam_cmp_ignore_user_defined = true; @@ -703,24 +703,24 @@ typedef struct _interface_config { #define DATAFILE_TECMP_INTERFACE_IDS "TECMP_interface_identifiers" #define DATAFILE_TECMP_CONTROL_MSG_IDS "TECMP_control_message_identifiers" -static GHashTable *data_tecmp_devices = NULL; -static generic_one_id_string_t* tecmp_devices = NULL; -static guint tecmp_devices_num = 0; +static GHashTable *data_tecmp_devices; +static generic_one_id_string_t* tecmp_devices; +static guint tecmp_devices_num; UAT_HEX_CB_DEF(tecmp_devices, id, generic_one_id_string_t) UAT_CSTRING_CB_DEF(tecmp_devices, name, generic_one_id_string_t) -static GHashTable *data_tecmp_interfaces = NULL; -static interface_config_t* tecmp_interfaces = NULL; -static guint tecmp_interfaces_num = 0; +static GHashTable *data_tecmp_interfaces; +static interface_config_t* tecmp_interfaces; +static guint tecmp_interfaces_num; UAT_HEX_CB_DEF(tecmp_interfaces, id, interface_config_t) UAT_CSTRING_CB_DEF(tecmp_interfaces, name, interface_config_t) UAT_HEX_CB_DEF(tecmp_interfaces, bus_id, interface_config_t) -static GHashTable *data_tecmp_ctrlmsgids = NULL; -static generic_one_id_string_t* tecmp_ctrl_msgs = NULL; -static guint tecmp_ctrl_msg_num = 0; +static GHashTable *data_tecmp_ctrlmsgids; +static generic_one_id_string_t* tecmp_ctrl_msgs; +static guint tecmp_ctrl_msg_num; UAT_HEX_CB_DEF(tecmp_ctrl_msgs, id, generic_one_id_string_t) UAT_CSTRING_CB_DEF(tecmp_ctrl_msgs, name, generic_one_id_string_t) diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index cff96bb77a..6e1a50e897 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -154,7 +154,7 @@ static const fragment_items tftp_frag_items = { void proto_reg_handoff_tftp (void); /* User definable values */ -static range_t *global_tftp_port_range = NULL; +static range_t *global_tftp_port_range; /* minimum length is an ACK message of 4 bytes */ #define MIN_HDR_LEN 4 @@ -208,7 +208,7 @@ static const value_string tftp_error_code_vals[] = { static int tftp_eo_tap; /* Preference setting - defragment fragmented TFTP files */ -static bool tftp_defragment = false; +static bool tftp_defragment; /* Used for TFTP Export Object feature */ typedef struct _tftp_eo_t { diff --git a/epan/dissectors/packet-thread.c b/epan/dissectors/packet-thread.c index fe5dab2b86..fe5ee7272f 100644 --- a/epan/dissectors/packet-thread.c +++ b/epan/dissectors/packet-thread.c @@ -1024,12 +1024,12 @@ static int dissect_thread_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); /* Preferences */ -static bool thread_use_pan_id_in_key = false; -static const gchar *thread_seq_ctr_str = NULL; +static bool thread_use_pan_id_in_key; +static const gchar *thread_seq_ctr_str; static bool thread_auto_acq_seq_ctr = true; -static gboolean thread_seq_ctr_acqd = FALSE; +static gboolean thread_seq_ctr_acqd; static guint8 thread_seq_ctr_bytes[4]; static const guint8 thread_well_known_key[IEEE802154_CIPHER_SIZE] = { 0x78, 0x58, 0x16, 0x86, 0xfd, 0xb4, 0x58, 0x0f, 0xb0, 0x92, 0x54, 0x6a, 0xec, 0xbd, 0x15, 0x66 }; diff --git a/epan/dissectors/packet-thrift.c b/epan/dissectors/packet-thrift.c index 1a80a704bc..f24a08c916 100644 --- a/epan/dissectors/packet-thrift.c +++ b/epan/dissectors/packet-thrift.c @@ -72,10 +72,10 @@ void proto_reg_handoff_thrift(void); static dissector_handle_t thrift_handle; static dissector_handle_t thrift_http_handle; static bool framed_desegment = true; -static guint thrift_tls_port = 0; +static guint thrift_tls_port; -static bool show_internal_thrift_fields = false; -static bool try_generic_if_sub_dissector_fails = false; +static bool show_internal_thrift_fields; +static bool try_generic_if_sub_dissector_fails; static guint nested_type_depth = 25; static dissector_table_t thrift_method_name_dissector_table; @@ -110,7 +110,7 @@ static const int TBP_THRIFT_LINEAR_LEN = 5; /* Elements type + number of element * - T_I8 * - T_DOUBLE (endianness is inverted, though) */ -static const int TCP_THRIFT_DELTA_NOT_SET = 0; +static const int TCP_THRIFT_DELTA_NOT_SET; static const int TCP_THRIFT_LENGTH_LARGER = 0xf; static const int TCP_THRIFT_MAP_TYPES_LEN = 1; /* High nibble = key type, low nibble = value type. */ static const int TCP_THRIFT_NIBBLE_SHIFT = 4; diff --git a/epan/dissectors/packet-tibia.c b/epan/dissectors/packet-tibia.c index fb43d96ff2..e8edeb9aa6 100644 --- a/epan/dissectors/packet-tibia.c +++ b/epan/dissectors/packet-tibia.c @@ -146,9 +146,9 @@ UAT_CSTRING_CB_DEF(rsakeylist_uats, password, struct rsakeys_assoc) static void rsakey_free(void *_rsakey); -static uat_t *rsakeys_uat = NULL; -static struct rsakeys_assoc *rsakeylist_uats = NULL; -static guint nrsakeys = 0; +static uat_t *rsakeys_uat; +static struct rsakeys_assoc *rsakeylist_uats; +static guint nrsakeys; #endif #define XTEA_KEY_LEN 16 @@ -168,9 +168,9 @@ static bool xteakeys_uat_fld_key_chk_cb(void *, const char *, guint, const void UAT_DEC_CB_DEF(xteakeylist_uats, framenum, struct xteakeys_assoc) UAT_CSTRING_CB_DEF(xteakeylist_uats, key, struct xteakeys_assoc) -static uat_t *xteakeys_uat = NULL; -static struct xteakeys_assoc *xteakeylist_uats = NULL; -static guint nxteakeys = 0; +static uat_t *xteakeys_uat; +static struct xteakeys_assoc *xteakeylist_uats; +static guint nxteakeys; #define COND_POISONED 0x00000001 #define COND_BURNING 0x00000002 diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index a174bd1a7d..f8233d2ab3 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -189,7 +189,7 @@ static int tipc_address_type = -1; /* protocol preferences */ static bool tipc_defragment = true; static bool dissect_tipc_data = true; -static bool try_heuristic_first = false; +static bool try_heuristic_first; #define V2_AS_ALL 0x1 #define V2_AS_1_6 0x2 #define V2_AS_1_7 0x4 diff --git a/epan/dissectors/packet-tls-utils.c b/epan/dissectors/packet-tls-utils.c index 9f54764ca8..36249aff59 100644 --- a/epan/dissectors/packet-tls-utils.c +++ b/epan/dissectors/packet-tls-utils.c @@ -2858,7 +2858,7 @@ gint ssl_get_keyex_alg(gint cipher) /* }}} */ } -static wmem_list_t *connection_id_session_list = NULL; +static wmem_list_t *connection_id_session_list; void ssl_init_cid_list(void) { @@ -6626,7 +6626,7 @@ ssl_load_keyfile(const gchar *tls_keylog_filename, FILE **keylog_file, #ifdef SSL_DECRYPT_DEBUG /* {{{ */ -static FILE* ssl_debug_file=NULL; +static FILE* ssl_debug_file; void ssl_set_debug(const gchar* name) diff --git a/epan/dissectors/packet-tls.c b/epan/dissectors/packet-tls.c index 10e3a74973..6c9e8bcd64 100644 --- a/epan/dissectors/packet-tls.c +++ b/epan/dissectors/packet-tls.c @@ -79,13 +79,13 @@ void proto_register_tls(void); #ifdef HAVE_LIBGNUTLS -static ssldecrypt_assoc_t *tlskeylist_uats = NULL; -static guint ntlsdecrypt = 0; +static ssldecrypt_assoc_t *tlskeylist_uats; +static guint ntlsdecrypt; #endif static bool tls_desegment = true; static bool tls_desegment_app_data = true; -static bool tls_ignore_mac_failed = false; +static bool tls_ignore_mac_failed; /********************************************************************* @@ -245,23 +245,23 @@ ssl_proto_tree_add_segment_data( static ssl_master_key_map_t ssl_master_key_map; #ifdef HAVE_LIBGNUTLS -static GHashTable *ssl_key_hash = NULL; -static wmem_stack_t *key_list_stack = NULL; -static uat_t *ssldecrypt_uat = NULL; -static const gchar *ssl_keys_list = NULL; +static GHashTable *ssl_key_hash; +static wmem_stack_t *key_list_stack; +static uat_t *ssldecrypt_uat; +static const gchar *ssl_keys_list; #endif -static dissector_table_t ssl_associations = NULL; -static dissector_handle_t tls_handle = NULL; -static StringInfo ssl_compressed_data = {NULL, 0}; -static StringInfo ssl_decrypted_data = {NULL, 0}; -static gint ssl_decrypted_data_avail = 0; -static FILE *ssl_keylog_file = NULL; -static ssl_common_options_t ssl_options = { NULL, NULL}; +static dissector_table_t ssl_associations; +static dissector_handle_t tls_handle; +static StringInfo ssl_compressed_data; +static StringInfo ssl_decrypted_data; +static gint ssl_decrypted_data_avail; +static FILE *ssl_keylog_file; +static ssl_common_options_t ssl_options; /* List of dissectors to call for TLS data */ static heur_dissector_list_t ssl_heur_subdissector_list; -static const gchar *ssl_debug_file_name = NULL; +static const gchar *ssl_debug_file_name; /* Forward declaration we need below */ diff --git a/epan/dissectors/packet-tpm20.c b/epan/dissectors/packet-tpm20.c index f9e3502912..d4525dff9b 100644 --- a/epan/dissectors/packet-tpm20.c +++ b/epan/dissectors/packet-tpm20.c @@ -25,7 +25,7 @@ typedef struct { guint32 num_auths; } tpm_entry; -static wmem_tree_t *cmd_tree = NULL; +static wmem_tree_t *cmd_tree; static guint last_command_pnum; static bool response_size = TRUE; diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c index 92cc8479bc..5669b3d362 100644 --- a/epan/dissectors/packet-tpncp.c +++ b/epan/dissectors/packet-tpncp.c @@ -106,7 +106,7 @@ static expert_field ei_tpncp_unknown_data; static gint ett_tpncp; static gint ett_tpncp_body; -static bool global_tpncp_load_db = false; +static bool global_tpncp_load_db; static dissector_handle_t tpncp_handle; static dissector_handle_t tpncp_tcp_handle; @@ -119,11 +119,11 @@ static value_string tpncp_events_id_vals[MAX_TPNCP_DB_SIZE]; static value_string tpncp_enums_id_vals[MAX_ENUMS_NUM][MAX_ENUM_ENTRIES]; static gchar *tpncp_enums_name_vals[MAX_ENUMS_NUM]; -static gint hf_size = 0; -static gint hf_allocated = 0; -static hf_register_info *hf = NULL; +static gint hf_size; +static gint hf_allocated; +static hf_register_info *hf; -static gboolean db_initialized = FALSE; +static gboolean db_initialized; /*---------------------------------------------------------------------------*/ diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c index 35180c4bfd..80024e1841 100644 --- a/epan/dissectors/packet-tr.c +++ b/epan/dissectors/packet-tr.c @@ -58,7 +58,7 @@ static int tr_tap; /* * Check for and attempt to fix Linux link-layer header mangling. */ -static bool fix_linux_botches = false; +static bool fix_linux_botches; #define TR_MIN_HEADER_LEN 14 #define TR_MAX_HEADER_LEN 32 diff --git a/epan/dissectors/packet-u3v.c b/epan/dissectors/packet-u3v.c index b753e35597..98ad938fb3 100644 --- a/epan/dissectors/packet-u3v.c +++ b/epan/dissectors/packet-u3v.c @@ -605,7 +605,7 @@ static int ett_u3v_device_info_descriptor_speed_support; static int ett_u3v_device_info_descriptor_gencp_version; static int ett_u3v_device_info_descriptor_u3v_version; -static dissector_handle_t u3v_handle = NULL; +static dissector_handle_t u3v_handle; static const value_string command_names[] = { diff --git a/epan/dissectors/packet-uasip.c b/epan/dissectors/packet-uasip.c index 6c575bbf1f..36cf77146a 100644 --- a/epan/dissectors/packet-uasip.c +++ b/epan/dissectors/packet-uasip.c @@ -52,10 +52,10 @@ static gint ett_uasip_tlv; static expert_field ei_uasip_tlv_length; static guint8 proxy_ipaddr[4]; -static const char *pref_proxy_ipaddr_s = NULL; +static const char *pref_proxy_ipaddr_s; -static gboolean use_proxy_ipaddr = FALSE; -static bool noesip_enabled = false; +static gboolean use_proxy_ipaddr; +static bool noesip_enabled; static dissector_handle_t uasip_handle; diff --git a/epan/dissectors/packet-uaudp.c b/epan/dissectors/packet-uaudp.c index a41064f2ed..bc4c8d2289 100644 --- a/epan/dissectors/packet-uaudp.c +++ b/epan/dissectors/packet-uaudp.c @@ -54,13 +54,13 @@ static expert_field ei_uaudp_tlv_length; /* pref */ #define UAUDP_PORT_RANGE "32000,32512" /* Not IANA registered */ -static range_t *ua_udp_range = NULL; +static range_t *ua_udp_range; static address cs_address = ADDRESS_INIT_NONE; static ws_in4_addr cs_ipv4; static ws_in6_addr cs_ipv6; static const char* pref_sys_ip_s = ""; -static gboolean use_sys_ip = FALSE; +static gboolean use_sys_ip; static const value_string uaudp_opcode_str[] = { diff --git a/epan/dissectors/packet-uavcan-can.c b/epan/dissectors/packet-uavcan-can.c index f23865920e..fd51f64d2f 100644 --- a/epan/dissectors/packet-uavcan-can.c +++ b/epan/dissectors/packet-uavcan-can.c @@ -73,7 +73,7 @@ static int hf_uavcan_transfer_id; static int uavcan_address_type = -1; -static wmem_tree_t *fragment_info_table = NULL; +static wmem_tree_t *fragment_info_table; static reassembly_table uavcan_reassembly_table; @@ -107,7 +107,7 @@ typedef struct _fragment_info_t guint32 seq_id; } fragment_info_t; -guint32 uavcan_seq_id = 0; +guint32 uavcan_seq_id; static const fragment_items uavcan_frag_items = { /* Fragment subtrees */ diff --git a/epan/dissectors/packet-ubertooth.c b/epan/dissectors/packet-ubertooth.c index 7da829d354..625e4871b0 100644 --- a/epan/dissectors/packet-ubertooth.c +++ b/epan/dissectors/packet-ubertooth.c @@ -324,7 +324,7 @@ static expert_field ei_unexpected_data; static dissector_handle_t ubertooth_handle; static dissector_handle_t bluetooth_ubertooth_handle; -static wmem_tree_t *command_info = NULL; +static wmem_tree_t *command_info; typedef struct _command_data { guint32 bus_id; diff --git a/epan/dissectors/packet-uci.c b/epan/dissectors/packet-uci.c index 66dd1281a5..a8bd2f58db 100644 --- a/epan/dissectors/packet-uci.c +++ b/epan/dissectors/packet-uci.c @@ -184,7 +184,7 @@ static bool gPREF_TCP_DESEGMENT = true; static guint gPREF_TCP_PORT = 7000; static int proto_uci; -static dissector_handle_t handle_uci = NULL; +static dissector_handle_t handle_uci; static int hf_uci_message_type; static int hf_uci_packet_boundary_flag; diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 7108881958..8dea83cde8 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -92,19 +92,19 @@ static expert_field ei_udp_length_bad_zero; static bool udp_summary_in_tree = true; /* Check UDP checksums */ -static bool udp_check_checksum = false; +static bool udp_check_checksum; /* Ignore zero-value UDP checksums over IPv6 */ -static bool udp_ignore_ipv6_zero_checksum = false; +static bool udp_ignore_ipv6_zero_checksum; /* Collect IPFIX process flow information */ -static bool udp_process_info = false; +static bool udp_process_info; /* Ignore an invalid checksum coverage field for UDP-Lite */ static bool udplite_ignore_checksum_coverage = true; /* Check UDP-Lite checksums */ -static bool udplite_check_checksum = false; +static bool udplite_check_checksum; static dissector_table_t udp_dissector_table; static heur_dissector_list_t heur_subdissector_list; @@ -114,7 +114,7 @@ static guint32 udp_stream_count; /* separated into a stand alone routine so other protocol dissectors */ /* can call to it, ie. socks */ -static bool try_heuristic_first = false; +static bool try_heuristic_first; static bool udp_calculate_ts = true; static bool udplite_calculate_ts = true; diff --git a/epan/dissectors/packet-udpcp.c b/epan/dissectors/packet-udpcp.c index 1115a4e08f..967de778d1 100644 --- a/epan/dissectors/packet-udpcp.c +++ b/epan/dissectors/packet-udpcp.c @@ -104,7 +104,7 @@ static dissector_handle_t udpcp_handle; void proto_reg_handoff_udpcp (void); /* User definable values */ -static range_t *global_udpcp_port_range = NULL; +static range_t *global_udpcp_port_range; #define DATA_FORMAT 0x01 #define ACK_FORMAT 0x02 @@ -134,7 +134,7 @@ typedef struct { /* Framenum -> expected_sequence_number */ -static wmem_tree_t *sequence_number_result_table = NULL; +static wmem_tree_t *sequence_number_result_table; /* Reassembly table. */ diff --git a/epan/dissectors/packet-uds.c b/epan/dissectors/packet-uds.c index b7564a4bd9..0430a172f7 100644 --- a/epan/dissectors/packet-uds.c +++ b/epan/dissectors/packet-uds.c @@ -1270,9 +1270,9 @@ simple_free(gpointer data) { /* Routine IDs */ -static generic_addr_id_string_t *uds_uat_routine_ids = NULL; -static guint uds_uat_routine_id_num = 0; -static GHashTable *uds_ht_routine_ids = NULL; +static generic_addr_id_string_t *uds_uat_routine_ids; +static guint uds_uat_routine_id_num; +static GHashTable *uds_ht_routine_ids; UAT_HEX_CB_DEF(uds_uat_routine_ids, address, generic_addr_id_string_t) UAT_HEX_CB_DEF(uds_uat_routine_ids, id, generic_addr_id_string_t) @@ -1319,9 +1319,9 @@ infocol_append_routine_name(packet_info *pinfo, guint32 addr, guint16 routine_id /* Data IDs */ -static generic_addr_id_string_t *uds_uat_data_ids = NULL; -static guint uds_uat_data_id_num = 0; -static GHashTable *uds_ht_data_ids = NULL; +static generic_addr_id_string_t *uds_uat_data_ids; +static guint uds_uat_data_id_num; +static GHashTable *uds_ht_data_ids; UAT_HEX_CB_DEF(uds_uat_data_ids, address, generic_addr_id_string_t) UAT_HEX_CB_DEF(uds_uat_data_ids, id, generic_addr_id_string_t) @@ -1368,9 +1368,9 @@ infocol_append_data_name(packet_info *pinfo, guint32 addr, guint16 data_identifi /* DTC IDs */ -static generic_addr_id_string_t *uds_uat_dtc_ids = NULL; -static guint uds_uat_dtc_id_num = 0; -static GHashTable *uds_ht_dtc_ids = NULL; +static generic_addr_id_string_t *uds_uat_dtc_ids; +static guint uds_uat_dtc_id_num; +static GHashTable *uds_ht_dtc_ids; UAT_HEX_CB_DEF(uds_uat_dtc_ids, address, generic_addr_id_string_t) UAT_HEX_CB_DEF(uds_uat_dtc_ids, id, generic_addr_id_string_t) @@ -1409,9 +1409,9 @@ protoitem_append_dtc_name(proto_item *ti, guint32 addr, guint32 dtc_id) { /* Addresses */ -static address_string_t *uds_uat_addresses = NULL; -static guint uds_uat_addresses_num = 0; -static GHashTable *uds_ht_addresses = NULL; +static address_string_t *uds_uat_addresses; +static guint uds_uat_addresses_num; +static GHashTable *uds_ht_addresses; UAT_HEX_CB_DEF(uds_uat_addresses, address, address_string_t) UAT_CSTRING_CB_DEF(uds_uat_addresses, name, address_string_t) diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 06ac95d2ba..64c582bba3 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -240,7 +240,7 @@ static dissector_handle_t fp_handle; static dissector_handle_t fp_aal2_handle; -static proto_tree *top_level_tree = NULL; +static proto_tree *top_level_tree; /* Variables used for preferences */ static bool preferences_call_mac_dissectors = true; diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index 8a1887ce5f..7ff7baf787 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -129,8 +129,8 @@ typedef struct { guint8 lchid; /* Logical Channel Identifier. */ guint ueid; /* User Equipment Identifier. */ } mac_is_channel; -static GHashTable * mac_is_sdus = NULL; /* channel -> (frag -> sdu) */ -static GHashTable * mac_is_fragments = NULL; /* channel -> body_parts[] */ +static GHashTable * mac_is_sdus; /* channel -> (frag -> sdu) */ +static GHashTable * mac_is_fragments; /* channel -> body_parts[] */ static gboolean mac_is_channel_equal(gconstpointer a, gconstpointer b) { const mac_is_channel *x = (const mac_is_channel *)a, *y = (const mac_is_channel *)b; diff --git a/epan/dissectors/packet-umts_rlc.c b/epan/dissectors/packet-umts_rlc.c index 707b957a07..63a103eb5a 100644 --- a/epan/dissectors/packet-umts_rlc.c +++ b/epan/dissectors/packet-umts_rlc.c @@ -46,20 +46,20 @@ extern int proto_fp; static bool global_rlc_perform_reassemby = true; /* Preference to expect RLC headers without payloads */ -static bool global_rlc_headers_expected = false; +static bool global_rlc_headers_expected; /* Preference to expect ONLY ciphered data */ -static bool global_rlc_ciphered = false; +static bool global_rlc_ciphered; /* Preference to ignore ciphering state reported from RRC */ /* This is important for captures with deciphered traffic AND the original security RRC messages present*/ -static bool global_ignore_rrc_ciphering_indication = false; +static bool global_ignore_rrc_ciphering_indication; /* Preference to try deciphering */ -static bool global_rlc_try_decipher = false; +static bool global_rlc_try_decipher; #ifdef HAVE_UMTS_KASUMI -static const char *global_rlc_kasumi_key = NULL; +static const char *global_rlc_kasumi_key; #endif /* LI size preference */ @@ -228,11 +228,11 @@ static const value_string rlc_sufi_vals[] = { }; /* reassembly related data */ -static GHashTable *fragment_table = NULL; /* table of not yet assembled fragments */ -static GHashTable *endpoints = NULL; /* List of SDU-endpoints */ -static GHashTable *reassembled_table = NULL; /* maps fragment -> complete sdu */ -static GHashTable *sequence_table = NULL; /* channel -> seq */ -static GHashTable *duplicate_table = NULL; /* duplicates */ +static GHashTable *fragment_table; /* table of not yet assembled fragments */ +static GHashTable *endpoints; /* List of SDU-endpoints */ +static GHashTable *reassembled_table; /* maps fragment -> complete sdu */ +static GHashTable *sequence_table; /* channel -> seq */ +static GHashTable *duplicate_table; /* duplicates */ /* identify an RLC channel, using one of two options: * - via Radio Bearer ID and unique UE ID @@ -306,7 +306,7 @@ typedef struct umts_kat_key{ /*Stores 128-bits KASUMI key*/ /*Counter used as input for confidentiality algorithm*/ static guint32 ps_counter[31][2] ; static gboolean counter_init[31][2]; -static guint32 max_counter = 0; +static guint32 max_counter; static GTree * counter_map; /*Saves the countervalues at first pass through, since they will be update*/ /* hashtable functions for fragment table diff --git a/epan/dissectors/packet-usb-com.c b/epan/dissectors/packet-usb-com.c index c9de4b4a20..674ffec9a1 100644 --- a/epan/dissectors/packet-usb-com.c +++ b/epan/dissectors/packet-usb-com.c @@ -139,7 +139,7 @@ static dissector_handle_t eth_withoutfcs_handle; static expert_field ei_unexpected_controlling_iface; -static wmem_tree_t* controlling_ifaces = NULL; +static wmem_tree_t* controlling_ifaces; typedef struct _controlling_iface { guint16 interfaceClass; diff --git a/epan/dissectors/packet-usb-dfu.c b/epan/dissectors/packet-usb-dfu.c index 6a2fe7465b..a32a335395 100644 --- a/epan/dissectors/packet-usb-dfu.c +++ b/epan/dissectors/packet-usb-dfu.c @@ -56,7 +56,7 @@ static dissector_handle_t usb_dfu_handle; static dissector_handle_t usf_dfu_descriptor_handle; -static wmem_tree_t *command_info = NULL; +static wmem_tree_t *command_info; typedef struct _command_data { guint32 bus_id; diff --git a/epan/dissectors/packet-usb-hid.c b/epan/dissectors/packet-usb-hid.c index 82e47cee5f..d734b0109b 100644 --- a/epan/dissectors/packet-usb-hid.c +++ b/epan/dissectors/packet-usb-hid.c @@ -181,7 +181,7 @@ struct usb_hid_global_state { unsigned int usage_page; }; -static wmem_tree_t *report_descriptors = NULL; +static wmem_tree_t *report_descriptors; /* local items */ diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 989d7a7ef5..bffac71cf9 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -434,9 +434,9 @@ static heur_dissector_list_t heur_bulk_subdissector_list; static heur_dissector_list_t heur_control_subdissector_list; static heur_dissector_list_t heur_interrupt_subdissector_list; -static wmem_tree_t *device_to_protocol_table = NULL; -static wmem_tree_t *device_to_product_table = NULL; -static wmem_tree_t *usbpcap_setup_data = NULL; +static wmem_tree_t *device_to_protocol_table; +static wmem_tree_t *device_to_product_table; +static wmem_tree_t *usbpcap_setup_data; static dissector_table_t device_to_dissector; static dissector_table_t protocol_to_dissector; diff --git a/epan/dissectors/packet-usbll.c b/epan/dissectors/packet-usbll.c index bd1b801597..0f0b25531a 100644 --- a/epan/dissectors/packet-usbll.c +++ b/epan/dissectors/packet-usbll.c @@ -496,7 +496,7 @@ typedef struct usbll_data { struct usbll_data *next; } usbll_data_t; -static usbll_data_t *usbll_data_ptr = NULL; +static usbll_data_t *usbll_data_ptr; /* Transaction Translator arrays used only during first pass. */ static usbll_transaction_info_t ***tt_non_periodic; diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c index af0b0571f0..1e2a142f31 100644 --- a/epan/dissectors/packet-user_encap.c +++ b/epan/dissectors/packet-user_encap.c @@ -64,8 +64,8 @@ static int proto_user_encap; static expert_field ei_user_encap_not_handled; -static user_encap_t* encaps = NULL; -static guint num_encaps = 0; +static user_encap_t* encaps; +static guint num_encaps; static uat_t* encaps_uat; static gint exported_pdu_tap = -1; diff --git a/epan/dissectors/packet-v5ua.c b/epan/dissectors/packet-v5ua.c index 9a06ad1684..dd0fcff13b 100644 --- a/epan/dissectors/packet-v5ua.c +++ b/epan/dissectors/packet-v5ua.c @@ -40,7 +40,7 @@ void proto_reg_handoff_v5ua(void); static dissector_handle_t v5ua_handle; -static int paddingl = 0; +static int paddingl; static int dlci_efa = -1; /* Initialize the protocol and registered fields */ diff --git a/epan/dissectors/packet-vcdu.c b/epan/dissectors/packet-vcdu.c index 65fd651d0f..ddd53c7877 100644 --- a/epan/dissectors/packet-vcdu.c +++ b/epan/dissectors/packet-vcdu.c @@ -164,9 +164,9 @@ typedef struct { guint channel; } uat_channel_t; -static uat_channel_t *uat_bitchannels = NULL; -static uat_t *vcdu_uat = NULL; -static guint num_channels_uat = 0; +static uat_channel_t *uat_bitchannels; +static uat_t *vcdu_uat; +static guint num_channels_uat; UAT_DEC_CB_DEF(uat_bitchannels, channel, uat_channel_t) diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index 92f3212bf2..33e1cd8de8 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -936,7 +936,7 @@ static expert_field ei_vnc_reassemble; * (5900+N is commonly used in the case of multiple servers, analogous to * X11.) */ -static range_t *vnc_tcp_range = NULL; +static range_t *vnc_tcp_range; static dissector_handle_t vnc_handle; static dissector_handle_t tls_handle; diff --git a/epan/dissectors/packet-vrrp.c b/epan/dissectors/packet-vrrp.c index ca2d7a2314..6d7768334b 100644 --- a/epan/dissectors/packet-vrrp.c +++ b/epan/dissectors/packet-vrrp.c @@ -47,7 +47,7 @@ static gint hf_vrrp_ip6; static gint hf_vrrp_auth_string; static gint hf_vrrp_md5_auth_data; -static bool g_vrrp_v3_checksum_as_in_v2 = false; +static bool g_vrrp_v3_checksum_as_in_v2; static expert_field ei_vrrp_checksum; diff --git a/epan/dissectors/packet-vrt.c b/epan/dissectors/packet-vrt.c index 6d335f1552..60360757fc 100644 --- a/epan/dissectors/packet-vrt.c +++ b/epan/dissectors/packet-vrt.c @@ -65,7 +65,7 @@ typedef struct { typedef int (*complex_dissector_t)(proto_tree *tree, tvbuff_t *tvb, int offset); -static bool vrt_use_ettus_uhd_header_format = false; +static bool vrt_use_ettus_uhd_header_format; static int proto_vrt; diff --git a/epan/dissectors/packet-vssmonitoring.c b/epan/dissectors/packet-vssmonitoring.c index b2b3344b60..b320d8b063 100644 --- a/epan/dissectors/packet-vssmonitoring.c +++ b/epan/dissectors/packet-vssmonitoring.c @@ -45,8 +45,8 @@ static int hf_vssmonitoring_srcport; static gint ett_vssmonitoring; -static bool vss_dissect_portstamping_only = false; -static bool vss_two_byte_portstamps = false; +static bool vss_dissect_portstamping_only; +static bool vss_two_byte_portstamps; static int dissect_vssmonitoring(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) diff --git a/epan/dissectors/packet-wassp.c b/epan/dissectors/packet-wassp.c index 7e7f4cc194..2867503690 100644 --- a/epan/dissectors/packet-wassp.c +++ b/epan/dissectors/packet-wassp.c @@ -4362,7 +4362,7 @@ void proto_register_wassp(void); void proto_reg_handoff_wassp(void); static int dissect_wassp_static(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_); -static int g_wassp_ver = 0; +static int g_wassp_ver; static reassembly_table wassp_reassembled_table; static void wassp_defragment_init(void) { diff --git a/epan/dissectors/packet-wbxml.c b/epan/dissectors/packet-wbxml.c index 9291046344..79a548f025 100644 --- a/epan/dissectors/packet-wbxml.c +++ b/epan/dissectors/packet-wbxml.c @@ -172,8 +172,8 @@ static expert_field ei_wbxml_too_much_recursion; static dissector_handle_t wbxml_handle; /* WBXML Preferences */ -static bool skip_wbxml_token_mapping = false; -static bool disable_wbxml_token_parsing = false; +static bool skip_wbxml_token_mapping; +static bool disable_wbxml_token_parsing; typedef struct _value_valuestring { diff --git a/epan/dissectors/packet-wireguard.c b/epan/dissectors/packet-wireguard.c index d4ea7d1c12..89028266ff 100644 --- a/epan/dissectors/packet-wireguard.c +++ b/epan/dissectors/packet-wireguard.c @@ -146,7 +146,7 @@ typedef struct wg_ekey { * Maps the public key to the "wg_skey_t" structure. * Keys are populated from the UAT and key log file. */ -static GHashTable *wg_static_keys = NULL; +static GHashTable *wg_static_keys; /* * Set of ephemeral keys (for decryption). Maps the public key to the diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index cf8d148891..5943f0e57b 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -52,7 +52,7 @@ void proto_register_x11(void); void proto_reg_handoff_x11(void); -static dissector_handle_t x11_handle = NULL; +static dissector_handle_t x11_handle; #define cVALS(x) (const value_string*)(x) diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c index 7045f2bd5c..b16ead9ae3 100644 --- a/epan/dissectors/packet-x25.c +++ b/epan/dissectors/packet-x25.c @@ -515,9 +515,9 @@ static dissector_handle_t ositp_handle; static dissector_handle_t qllc_handle; /* Preferences */ -static bool payload_is_qllc_sna = false; -static bool call_request_nodata_is_cotp = false; -static bool payload_check_data = false; +static bool payload_is_qllc_sna; +static bool call_request_nodata_is_cotp; +static bool payload_check_data; static bool reassemble_x25 = true; /* Reassembly of X.25 */ diff --git a/epan/dissectors/packet-x509af.c b/epan/dissectors/packet-x509af.c index c1fec7f8f6..b7d1e64335 100644 --- a/epan/dissectors/packet-x509af.c +++ b/epan/dissectors/packet-x509af.c @@ -156,7 +156,7 @@ static gint ett_x509af_AttributeCertificateAssertion; static gint ett_x509af_AssertionSubject; static gint ett_x509af_SET_OF_AttributeType; static gint ett_x509af_DSS_Params; -static const char *algorithm_id = NULL; +static const char *algorithm_id; static void x509af_export_publickey(tvbuff_t *tvb, asn1_ctx_t *actx, int offset, int len); diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index edb20e9821..4eb96da2c3 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -270,21 +270,21 @@ static gint ett_x509if_SEQUENCE_SIZE_1_MAX_OF_ResultAttribute; static gint ett_x509if_SEQUENCE_SIZE_1_MAX_OF_AttributeType; static gint ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString; -static proto_tree *top_of_dn = NULL; -static proto_tree *top_of_rdn = NULL; +static proto_tree *top_of_dn; +static proto_tree *top_of_rdn; -static gboolean rdn_one_value = FALSE; /* have we seen one value in an RDN yet */ -static gboolean dn_one_rdn = FALSE; /* have we seen one RDN in a DN yet */ -static gboolean doing_attr = FALSE; +static gboolean rdn_one_value; /* have we seen one value in an RDN yet */ +static gboolean dn_one_rdn; /* have we seen one RDN in a DN yet */ +static gboolean doing_attr; -static wmem_strbuf_t *last_dn_buf = NULL; -static wmem_strbuf_t *last_rdn_buf = NULL; +static wmem_strbuf_t *last_dn_buf; +static wmem_strbuf_t *last_rdn_buf; static int ava_hf_index; #define MAX_FMT_VALS 32 static value_string fmt_vals[MAX_FMT_VALS]; #define MAX_AVA_STR_LEN 64 -static char *last_ava = NULL; +static char *last_ava; static void x509if_frame_end(void) diff --git a/epan/dissectors/packet-xmcp.c b/epan/dissectors/packet-xmcp.c index ea27386884..89ef8d08ec 100644 --- a/epan/dissectors/packet-xmcp.c +++ b/epan/dissectors/packet-xmcp.c @@ -298,10 +298,10 @@ static const value_string service_removed_reasons[] = { /* Dissector state variables */ static guint16 xmcp_msg_type_method = XMCP_METHOD_ILLEGAL; static guint16 xmcp_msg_type_class = XMCP_CLASS_RESERVED; -static gboolean xmcp_msg_is_keepalive = FALSE; +static gboolean xmcp_msg_is_keepalive; static gint16 xmcp_service_protocol = -1; static gint32 xmcp_service_port = -1; -static proto_item *xmcp_it_service_port = NULL; +static proto_item *xmcp_it_service_port; static guint get_xmcp_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c index da1069e3fc..4afabf34b1 100644 --- a/epan/dissectors/packet-xml.c +++ b/epan/dissectors/packet-xml.c @@ -74,7 +74,7 @@ static xml_ns_t xml_ns = {"xml", "/", -1, -1, -1, NULL, NULL, NULL}; static xml_ns_t unknown_ns = {"unknown", "?", -1, -1, -1, NULL, NULL, NULL}; static xml_ns_t *root_ns; -static bool pref_heuristic_unicode = false; +static bool pref_heuristic_unicode; static gint pref_default_encoding = IANA_CS_UTF_8; diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c index 3440e5994e..0392966d54 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -92,7 +92,7 @@ static dissector_handle_t x25_handle; /* desegmentation of X.25 over multiple TCP */ static bool xot_desegment = true; /* desegmentation of X.25 packet sequences */ -static bool x25_desegment = false; +static bool x25_desegment; static guint get_xot_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) diff --git a/epan/dissectors/packet-z3950.c b/epan/dissectors/packet-z3950.c index 0f2731e1f3..04caa31275 100644 --- a/epan/dissectors/packet-z3950.c +++ b/epan/dissectors/packet-z3950.c @@ -104,7 +104,7 @@ typedef struct marc_directory_entry { guint32 starting_character; } marc_directory_entry; -static dissector_handle_t z3950_handle=NULL; +static dissector_handle_t z3950_handle; void proto_reg_handoff_z3950(void); void proto_register_z3950(void); diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c index c6f0fbf45f..b11031fd24 100644 --- a/epan/dissectors/packet-zbee-aps.c +++ b/epan/dissectors/packet-zbee-aps.c @@ -184,7 +184,7 @@ static const fragment_items zbee_aps_frag_items = { "APS Message fragments" }; -static GHashTable *zbee_table_aps_extended_counters = NULL; +static GHashTable *zbee_table_aps_extended_counters; /********************/ /* Field Names */ diff --git a/epan/dissectors/packet-zbee-direct.c b/epan/dissectors/packet-zbee-direct.c index 28103514ce..bec9758314 100644 --- a/epan/dissectors/packet-zbee-direct.c +++ b/epan/dissectors/packet-zbee-direct.c @@ -159,9 +159,9 @@ UAT_CSTRING_CB_DEF(uat_key_records, zvd_ieee, uat_key_record_t) UAT_CSTRING_CB_DEF(uat_key_records, key, uat_key_record_t) UAT_CSTRING_CB_DEF(uat_key_records, label, uat_key_record_t) -static GSList *zbee_pc_keyring = NULL; -static uat_key_record_t *uat_key_records = NULL; -static guint num_uat_key_records = 0; +static GSList *zbee_pc_keyring; +static uat_key_record_t *uat_key_records; +static guint num_uat_key_records; /* Common data */ static guint8 g_conn_id; diff --git a/epan/dissectors/packet-zbee-nwk-gp.c b/epan/dissectors/packet-zbee-nwk-gp.c index 1c937a125a..c9e9c59019 100644 --- a/epan/dissectors/packet-zbee-nwk-gp.c +++ b/epan/dissectors/packet-zbee-nwk-gp.c @@ -332,8 +332,8 @@ static gint ett_zbee_nwk_cmd_comm_clid_list_server; static gint ett_zbee_nwk_cmd_comm_clid_list_client; /* Common. */ -static GSList *zbee_gp_keyring = NULL; -static guint num_uat_key_records = 0; +static GSList *zbee_gp_keyring; +static guint num_uat_key_records; typedef struct { gchar *string; @@ -346,7 +346,7 @@ static const guint8 empty_key[ZBEE_SEC_CONST_KEYSIZE] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static uat_key_record_t *gp_uat_key_records = NULL; +static uat_key_record_t *gp_uat_key_records; static uat_t *zbee_gp_sec_key_table_uat; /* UAT. */ diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index f254641928..74911f0a6f 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -376,9 +376,9 @@ static const value_string zbee_nwk_commissioning_types[] = { * Hash Tables and Lists *------------------------------------- */ -ieee802154_map_tab_t zbee_nwk_map = { NULL, NULL }; -GHashTable *zbee_table_nwk_keyring = NULL; -GHashTable *zbee_table_link_keyring = NULL; +ieee802154_map_tab_t zbee_nwk_map; +GHashTable *zbee_table_nwk_keyring; +GHashTable *zbee_table_link_keyring; static int zbee_nwk_address_to_str(const address* addr, gchar *buf, int buf_len) { diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c index 62f9250fbe..23336e2872 100644 --- a/epan/dissectors/packet-zbee-security.c +++ b/epan/dissectors/packet-zbee-security.c @@ -122,9 +122,9 @@ UAT_CSTRING_CB_DEF(uat_key_records, string, uat_key_record_t) UAT_VS_DEF(uat_key_records, byte_order, uat_key_record_t, guint8, 0, "Normal") UAT_CSTRING_CB_DEF(uat_key_records, label, uat_key_record_t) -static GSList *zbee_pc_keyring = NULL; -static uat_key_record_t *uat_key_records = NULL; -static guint num_uat_key_records = 0; +static GSList *zbee_pc_keyring; +static uat_key_record_t *uat_key_records; +static guint num_uat_key_records; static void* uat_key_record_copy_cb(void* n, const void* o, size_t siz _U_) { uat_key_record_t* new_key = (uat_key_record_t *)n; diff --git a/epan/dissectors/packet-zbee-zcl.c b/epan/dissectors/packet-zbee-zcl.c index 0198bcdf51..c872c1133e 100644 --- a/epan/dissectors/packet-zbee-zcl.c +++ b/epan/dissectors/packet-zbee-zcl.c @@ -160,7 +160,7 @@ static dissector_table_t zbee_zcl_dissector_table; static guint16 zcl_cluster_id = -1; static guint16 zcl_mfr_code = -1; -static GList *acluster_desc = NULL; +static GList *acluster_desc; /********************/ /* Field Names */ diff --git a/epan/dissectors/packet-zvt.c b/epan/dissectors/packet-zvt.c index 33048219b4..df297d29ee 100644 --- a/epan/dissectors/packet-zvt.c +++ b/epan/dissectors/packet-zvt.c @@ -47,9 +47,9 @@ #define ZVT_APDU_MIN_LEN 3 -static GHashTable *apdu_table = NULL, *bitmap_table = NULL, *tlv_table = NULL; +static GHashTable *apdu_table = NULL, *bitmap_table = NULL, *tlv_table; -static wmem_tree_t *transactions = NULL; +static wmem_tree_t *transactions; typedef struct _zvt_transaction_t { guint32 rqst_frame; diff --git a/epan/epan.c b/epan/epan.c index 404e3cc52c..4b5bc346ca 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -102,22 +102,22 @@ #include <signal.h> #endif -static GSList *epan_plugin_register_all_procotols = NULL; -static GSList *epan_plugin_register_all_handoffs = NULL; +static GSList *epan_plugin_register_all_procotols; +static GSList *epan_plugin_register_all_handoffs; -static wmem_allocator_t *pinfo_pool_cache = NULL; +static wmem_allocator_t *pinfo_pool_cache; /* Global variables holding the content of the corresponding environment variable * to save fetching it repeatedly. */ -gboolean wireshark_abort_on_dissector_bug = FALSE; -gboolean wireshark_abort_on_too_many_items = FALSE; +gboolean wireshark_abort_on_dissector_bug; +gboolean wireshark_abort_on_too_many_items; /* Used for bookkeeping, includes all libwireshark plugin types (dissector, tap, epan). */ -static plugins_t *libwireshark_plugins = NULL; +static plugins_t *libwireshark_plugins; /* "epan_plugins" are a specific type of libwireshark plugin (the name isn't the best for clarity). */ -static GSList *epan_plugins = NULL; +static GSList *epan_plugins; const gchar* epan_get_version(void) { @@ -534,7 +534,7 @@ epan_conversation_init(void) * This is > 0 if a Lua script wanted to see all fields all the time. * This is ref-counted, so clearing it won't override other taps/scripts wanting it. */ -static gint always_visible_refcount = 0; +static gint always_visible_refcount; void epan_set_always_visible(gboolean force) diff --git a/epan/ex-opt.c b/epan/ex-opt.c index a6a99ea3c4..012a157a78 100644 --- a/epan/ex-opt.c +++ b/epan/ex-opt.c @@ -17,7 +17,7 @@ #include <glib.h> #include "ex-opt.h" -static GHashTable* ex_opts = NULL; +static GHashTable* ex_opts; gboolean ex_opt_add(const gchar* ws_optarg) { gchar** splitted; diff --git a/epan/exntest.c b/epan/exntest.c index 47ac36c7a6..06568c9bd8 100644 --- a/epan/exntest.c +++ b/epan/exntest.c @@ -12,7 +12,7 @@ #include <glib.h> #include "exceptions.h" -gboolean failed = FALSE; +gboolean failed; static void finally_called_uncaught_exception(volatile unsigned int* called) diff --git a/epan/expert.c b/epan/expert.c index 35ce0e171c..b3d16bf656 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -35,7 +35,7 @@ int proto_expert; static int proto_malformed; static int expert_tap; -static int highest_severity = 0; +static int highest_severity; static int ett_expert; static int ett_subexpert; @@ -59,10 +59,10 @@ typedef struct _gpa_expertinfo_t { static gpa_expertinfo_t gpa_expertinfo; /* Hash table of abbreviations and IDs */ -static GHashTable *gpa_name_map = NULL; +static GHashTable *gpa_name_map; /* Deregistered expert infos */ -static GPtrArray *deregistered_expertinfos = NULL; +static GPtrArray *deregistered_expertinfos; const value_string expert_group_vals[] = { { PI_CHECKSUM, "Checksum" }, @@ -114,10 +114,10 @@ typedef struct guint32 severity; } expert_level_entry_t; -static expert_level_entry_t *uat_expert_entries = NULL; -static guint expert_level_entry_count = 0; +static expert_level_entry_t *uat_expert_entries; +static guint expert_level_entry_count; /* Array of field names currently in UAT */ -static GArray *uat_saved_fields = NULL; +static GArray *uat_saved_fields; UAT_CSTRING_CB_DEF(uat_expert_entries, field, expert_level_entry_t) UAT_VS_DEF(uat_expert_entries, severity, expert_level_entry_t, guint32, PI_ERROR, "Error") diff --git a/epan/export_object.c b/epan/export_object.c index 9a6e0ee959..f9d899729f 100644 --- a/epan/export_object.c +++ b/epan/export_object.c @@ -23,7 +23,7 @@ struct register_eo { export_object_gui_reset_cb reset_cb; /* function to parse parameters of optional arguments of tap string */ }; -static wmem_tree_t *registered_eo_tables = NULL; +static wmem_tree_t *registered_eo_tables; int register_export_object(const int proto_id, tap_packet_cb export_packet_func, export_object_gui_reset_cb reset_cb) diff --git a/epan/exported_pdu.c b/epan/exported_pdu.c index 9efcb2dfe1..8a094b6537 100644 --- a/epan/exported_pdu.c +++ b/epan/exported_pdu.c @@ -21,8 +21,8 @@ #include <wsutil/pint.h> -static GSList *export_pdu_tap_name_list = NULL; -static wmem_map_t *export_pdu_encap_table = NULL; +static GSList *export_pdu_tap_name_list; +static wmem_map_t *export_pdu_encap_table; static int exp_pdu_data_ip_size(const address* addr) { diff --git a/epan/filter_expressions.c b/epan/filter_expressions.c index c03a2bb250..2072605454 100644 --- a/epan/filter_expressions.c +++ b/epan/filter_expressions.c @@ -19,9 +19,9 @@ #include "epan/filter_expressions.h" /* UAT variables */ -static uat_t *display_filter_macro_uat = NULL; -static filter_expression_t *display_filter_macros = NULL; -static guint num_display_filter_macros = 0; +static uat_t *display_filter_macro_uat; +static filter_expression_t *display_filter_macros; +static guint num_display_filter_macros; /* Field callbacks. */ UAT_BOOL_CB_DEF(display_filter_macro_uat, enabled, filter_expression_t) diff --git a/epan/follow.c b/epan/follow.c index 709a734588..ce2e292345 100644 --- a/epan/follow.c +++ b/epan/follow.c @@ -32,7 +32,7 @@ struct register_follow { follow_sub_stream_id_func sub_stream_id; /* sub-stream id, used for UI */ }; -static wmem_tree_t *registered_followers = NULL; +static wmem_tree_t *registered_followers; void register_follow_stream(const int proto_id, const char* tap_listener, follow_conv_filter_func conv_filter, follow_index_filter_func index_filter, follow_address_filter_func address_filter, diff --git a/epan/funnel.c b/epan/funnel.c index c8d04f60f1..79d3bea298 100644 --- a/epan/funnel.c +++ b/epan/funnel.c @@ -37,11 +37,11 @@ typedef struct _console_menu { } funnel_console_menu_t; /* XXX This assumes one main window and one capture file. */ -static const funnel_ops_t* ops = NULL; -static funnel_menu_t* registered_menus = NULL; -static funnel_menu_t* added_menus = NULL; -static funnel_menu_t* removed_menus = NULL; -static bool menus_registered = false; +static const funnel_ops_t* ops; +static funnel_menu_t* registered_menus; +static funnel_menu_t* added_menus; +static funnel_menu_t* removed_menus; +static bool menus_registered; /** * Represents a single packet menu entry and callback @@ -66,14 +66,14 @@ typedef struct _funnel_packet_menu_t { /* * List of all registered funnel_packet_menu_t's */ -static funnel_packet_menu_t* registered_packet_menus = NULL; +static funnel_packet_menu_t* registered_packet_menus; -static GSList *registered_console_menus = NULL; +static GSList *registered_console_menus; /* * true if the packet menus were modified since the last registration */ -static bool packet_menus_modified = false; +static bool packet_menus_modified; static void funnel_clear_packet_menu (funnel_packet_menu_t** menu_list); const funnel_ops_t* funnel_get_funnel_ops(void) { return ops; } diff --git a/epan/guid-utils.c b/epan/guid-utils.c index fd0807dddd..92d8fd3b47 100644 --- a/epan/guid-utils.c +++ b/epan/guid-utils.c @@ -25,7 +25,7 @@ #include <strsafe.h> #endif -static wmem_tree_t *guid_to_name_tree = NULL; +static wmem_tree_t *guid_to_name_tree; #ifdef _WIN32 diff --git a/epan/maxmind_db.c b/epan/maxmind_db.c index 9355fbbc36..862fbb3579 100644 --- a/epan/maxmind_db.c +++ b/epan/maxmind_db.c @@ -107,7 +107,7 @@ UAT_DIRECTORYNAME_CB_DEF(maxmind_mod, path, maxmind_db_path_t) static GPtrArray *mmdb_file_arr; // .mmdb files -static gboolean resolve_synchronously = FALSE; +static gboolean resolve_synchronously; static void mmdb_resolve_stop(void); diff --git a/epan/oids.c b/epan/oids.c index 3508e5661e..438443c0bd 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -41,7 +41,7 @@ static bool suppress_smi_errors; #include "oids.h" -static int debuglevel = 0; +static int debuglevel; /* * From SNMPv2-SMI and X.690 @@ -231,13 +231,13 @@ typedef struct smi_module_t { char* name; } smi_module_t; -static smi_module_t* smi_paths = NULL; -static guint num_smi_paths = 0; -static uat_t* smi_paths_uat = NULL; +static smi_module_t* smi_paths; +static guint num_smi_paths; +static uat_t* smi_paths_uat; -static smi_module_t* smi_modules = NULL; -static guint num_smi_modules = 0; -static uat_t* smi_modules_uat = NULL; +static smi_module_t* smi_modules; +static guint num_smi_modules; +static uat_t* smi_modules_uat; static GString* smi_errors; diff --git a/epan/packet.c b/epan/packet.c index 2eb4438dab..0f1929fe3c 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -45,9 +45,9 @@ #include <wsutil/ws_assert.h> static gint proto_malformed; -static dissector_handle_t frame_handle = NULL; -static dissector_handle_t file_handle = NULL; -static dissector_handle_t data_handle = NULL; +static dissector_handle_t frame_handle; +static dissector_handle_t file_handle; +static dissector_handle_t data_handle; /** * A data source. @@ -97,17 +97,17 @@ struct dissector_table { /* * Dissector tables. const char * -> dissector_table * */ -static GHashTable *dissector_tables = NULL; +static GHashTable *dissector_tables; /* * Dissector table aliases. const char * -> const char * */ -static GHashTable *dissector_table_aliases = NULL; +static GHashTable *dissector_table_aliases; /* * List of registered dissectors. */ -static GHashTable *registered_dissectors = NULL; +static GHashTable *registered_dissectors; /* * A dissector dependency list. @@ -117,7 +117,7 @@ struct depend_dissector_list { }; /* Maps char *dissector_name to depend_dissector_list_t */ -static GHashTable *depend_dissector_lists = NULL; +static GHashTable *depend_dissector_lists; /* Allow protocols to register a "cleanup" routine to be * run after the initial sequential run through the packets. @@ -137,7 +137,7 @@ typedef struct { /* * Array of all postdissectors. */ -static GArray *postdissectors = NULL; +static GArray *postdissectors; /* * i-th element of that array. @@ -163,10 +163,10 @@ struct heur_dissector_list { GSList *dissectors; }; -static GHashTable *heur_dissector_lists = NULL; +static GHashTable *heur_dissector_lists; /* Name hashtables for fast detection of duplicate names */ -static GHashTable* heuristic_short_names = NULL; +static GHashTable* heuristic_short_names; static void destroy_heuristic_dissector_entry(gpointer data) @@ -245,7 +245,7 @@ packet_cache_proto_handles(void) * * See register_init_routine(). */ -static GSList *init_routines = NULL; +static GSList *init_routines; /** * List of "cleanup" routines, which are called after closing a capture @@ -255,7 +255,7 @@ static GSList *init_routines = NULL; * * See register_cleanup_routine(). */ -static GSList *cleanup_routines = NULL; +static GSList *cleanup_routines; /* * List of "shutdown" routines, which are called once, just before @@ -263,7 +263,7 @@ static GSList *cleanup_routines = NULL; * * See register_shutdown_routine(). */ -static GSList *shutdown_routines = NULL; +static GSList *shutdown_routines; typedef void (*void_func_t)(void); diff --git a/epan/plugin_if.c b/epan/plugin_if.c index 3ac04b1d8f..e2fa467d09 100644 --- a/epan/plugin_if.c +++ b/epan/plugin_if.c @@ -24,8 +24,8 @@ #include "plugin_if.h" -static GList * menubar_entries = NULL; -static GList * menubar_menunames = NULL; +static GList * menubar_entries; +static GList * menubar_menunames; static GHashTable * plugin_if_callback_functions; @@ -188,7 +188,7 @@ extern void ext_menubar_add_separator(ext_menu_t *parent) /* Implementation of external toolbar handlers */ -static GList * toolbar_entries = NULL; +static GList * toolbar_entries; extern GList * ext_toolbar_get_entries(void) { @@ -408,7 +408,7 @@ ext_toolbar_find_item(gconstpointer a, gconstpointer b) return -1; } -static GList * toolbar_updates = NULL; +static GList * toolbar_updates; void ext_toolbar_register_update_cb(ext_toolbar_t * entry, ext_toolbar_action_cb callback, gpointer item_data) { diff --git a/epan/prefs.c b/epan/prefs.c index 1e5e95147f..71aa43961b 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -82,11 +82,11 @@ static gint find_val_for_string(const char *needle, const enum_val_t *haystack, #define PF_NAME "preferences" #define OLD_GPF_NAME "wireshark.conf" /* old name for global preferences file */ -static gboolean prefs_initialized = FALSE; -static gchar *gpf_path = NULL; -static gchar *cols_hidden_list = NULL; -static gchar *cols_hidden_fmt_list = NULL; -static gboolean gui_theme_is_dark = FALSE; +static gboolean prefs_initialized; +static gchar *gpf_path; +static gchar *cols_hidden_list; +static gchar *cols_hidden_fmt_list; +static gboolean gui_theme_is_dark; /* * XXX - variables to allow us to attempt to interpret the first @@ -283,18 +283,18 @@ guint32 prefs_get_max_value(pref_t *pref) /* * List of all modules with preference settings. */ -static wmem_tree_t *prefs_modules = NULL; +static wmem_tree_t *prefs_modules; /* * List of all modules that should show up at the top level of the * tree in the preference dialog box. */ -static wmem_tree_t *prefs_top_level_modules = NULL; +static wmem_tree_t *prefs_top_level_modules; /* * List of aliases for modules. */ -static wmem_tree_t *prefs_module_aliases = NULL; +static wmem_tree_t *prefs_module_aliases; /** Sets up memory used by proto routines. Called at program startup */ void @@ -607,7 +607,7 @@ prefs_register_module_alias(const char *name, module_t *module) /* * Register that a protocol has preferences. */ -module_t *protocols_module = NULL; +module_t *protocols_module; module_t * prefs_register_protocol(int id, void (*apply_cb)(void)) @@ -749,7 +749,7 @@ prefs_register_protocol_obsolete(int id) * * "description" is a longer human-readable description of the tap. */ -module_t *stats_module = NULL; +module_t *stats_module; module_t * prefs_register_stat(const char *name, const char *title, @@ -781,7 +781,7 @@ prefs_register_stat(const char *name, const char *title, * * "description" is a longer human-readable description of the codec. */ -module_t *codecs_module = NULL; +module_t *codecs_module; module_t * prefs_register_codec(const char *name, const char *title, @@ -2505,7 +2505,7 @@ static void custom_pref_no_cb(pref_t* pref _U_) {} #define PRS_COL_HIDDEN "column.hide" #define PRS_COL_FMT "column.format" #define PRS_COL_NUM "column.number" -static module_t *gui_column_module = NULL; +static module_t *gui_column_module; static prefs_set_pref_e column_hidden_set_cb(pref_t* pref, const gchar* value, unsigned int* changed_flags) @@ -3165,9 +3165,9 @@ colorized_frame_to_str_cb(pref_t* pref _U_, gboolean default_val _U_) /* * Register all non-dissector modules' preferences. */ -static module_t *gui_module = NULL; -static module_t *gui_color_module = NULL; -static module_t *nameres_module = NULL; +static module_t *gui_module; +static module_t *gui_color_module; +static module_t *nameres_module; static void prefs_register_modules(void) diff --git a/epan/proto.c b/epan/proto.c index 8eea35c0fe..e4439fb55b 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -404,7 +404,7 @@ struct _protocol { }; /* List of all protocols */ -static GList *protocols = NULL; +static GList *protocols; /* Structure stored for deregistered g_slice */ struct g_slice_data { @@ -413,12 +413,12 @@ struct g_slice_data { }; /* Deregistered fields */ -static GPtrArray *deregistered_fields = NULL; -static GPtrArray *deregistered_data = NULL; -static GPtrArray *deregistered_slice = NULL; +static GPtrArray *deregistered_fields; +static GPtrArray *deregistered_data; +static GPtrArray *deregistered_slice; /* indexed by prefix, contains initializers */ -static GHashTable* prefixes = NULL; +static GHashTable* prefixes; /* Contains information about a field when a dissector calls * proto_tree_add_item. */ @@ -457,17 +457,17 @@ typedef struct _gpa_hfinfo_t { static gpa_hfinfo_t gpa_hfinfo; /* Hash table of abbreviations and IDs */ -static GHashTable *gpa_name_map = NULL; +static GHashTable *gpa_name_map; static header_field_info *same_name_hfinfo; /* Hash table protocol aliases. const char * -> const char * */ -static GHashTable *gpa_protocol_aliases = NULL; +static GHashTable *gpa_protocol_aliases; /* * We're called repeatedly with the same field name when sorting a column. * Cache our last gpa_name_map hit for faster lookups. */ -static char *last_field_name = NULL; +static char *last_field_name; static header_field_info *last_hfinfo; static void save_same_name_hfinfo(gpointer data) @@ -484,9 +484,9 @@ static guint32 *tree_is_expanded; int num_tree_types = 1; /* Name hashtables for fast detection of duplicate names */ -static GHashTable* proto_names = NULL; -static GHashTable* proto_short_names = NULL; -static GHashTable* proto_filter_names = NULL; +static GHashTable* proto_names; +static GHashTable* proto_short_names; +static GHashTable* proto_filter_names; static const char *reserved_filter_names[] = { /* Display filter keywords. */ @@ -518,7 +518,7 @@ static const char *reserved_filter_names[] = { NULL }; -static GHashTable *proto_reserved_filter_names = NULL; +static GHashTable *proto_reserved_filter_names; static gint proto_compare_name(gconstpointer p1_arg, gconstpointer p2_arg) @@ -529,7 +529,7 @@ proto_compare_name(gconstpointer p1_arg, gconstpointer p2_arg) return g_ascii_strcasecmp(p1->short_name, p2->short_name); } -static GSList *dissector_plugins = NULL; +static GSList *dissector_plugins; #ifdef HAVE_PLUGINS void diff --git a/epan/reassemble.c b/epan/reassemble.c index 543d091f67..6f868ef120 100644 --- a/epan/reassemble.c +++ b/epan/reassemble.c @@ -30,7 +30,7 @@ typedef struct _fragment_addresses_key { guint32 id; } fragment_addresses_key; -GList* reassembly_table_list = NULL; +GList* reassembly_table_list; static guint fragment_addresses_hash(gconstpointer k) diff --git a/epan/reassemble_test.c b/epan/reassemble_test.c index e1ba559b3a..bd008aea7b 100644 --- a/epan/reassemble_test.c +++ b/epan/reassemble_test.c @@ -44,8 +44,8 @@ #include "exceptions.h" -static int failure = 0; -static const gboolean debug = FALSE; /* Set to TRUE to dump tables. */ +static int failure; +static const gboolean debug; /* Set to TRUE to dump tables. */ #define ASSERT(b) \ if (!(b)) { \ diff --git a/epan/register.c b/epan/register.c index 1f8f2c2fa5..e6964178a2 100644 --- a/epan/register.c +++ b/epan/register.c @@ -17,7 +17,7 @@ #include "epan/dissectors/dissectors.h" -static const char *cur_cb_name = NULL; +static const char *cur_cb_name; // We could use g_atomic_pointer_set/get instead of a mutex, but that causes // a false positive with Clang and TSAN for GLib < 2.64.0 (Issue #17753): // https://gitlab.gnome.org/GNOME/glib/-/issues/1843 diff --git a/epan/rtd_table.c b/epan/rtd_table.c index 738e66ed40..557c995f36 100644 --- a/epan/rtd_table.c +++ b/epan/rtd_table.c @@ -54,7 +54,7 @@ const value_string* get_rtd_value_string(register_rtd_t* rtd) return rtd->vs_type; } -static wmem_tree_t *registered_rtd_tables = NULL; +static wmem_tree_t *registered_rtd_tables; void register_rtd_table(const int proto_id, const char* tap_listener, guint num_tables, guint num_timestats, const value_string* vs_type, diff --git a/epan/sequence_analysis.c b/epan/sequence_analysis.c index d061e31b67..a3bea193dc 100644 --- a/epan/sequence_analysis.c +++ b/epan/sequence_analysis.c @@ -32,7 +32,7 @@ struct register_analysis { tap_packet_cb analysis_func; /* function to be called for new incoming packets for sequence analysis */ }; -static wmem_tree_t *registered_seq_analysis = NULL; +static wmem_tree_t *registered_seq_analysis; void register_seq_analysis(const char* name, const char* ui_name, const int proto_id, const char* tap_listener, guint tap_flags, tap_packet_cb tap_func) diff --git a/epan/srt_table.c b/epan/srt_table.c index 843cff6715..b8b8aee58c 100644 --- a/epan/srt_table.c +++ b/epan/srt_table.c @@ -119,7 +119,7 @@ void reset_srt_table(GArray* srt_array) } } -static wmem_tree_t *registered_srt_tables = NULL; +static wmem_tree_t *registered_srt_tables; register_srt_t* get_srt_table_by_name(const char* name) { diff --git a/epan/stat_tap_ui.c b/epan/stat_tap_ui.c index 69ad4ae3a0..b620d1ed16 100644 --- a/epan/stat_tap_ui.c +++ b/epan/stat_tap_ui.c @@ -29,7 +29,7 @@ typedef struct _stat_cmd_arg { void* userdata; } stat_cmd_arg; -static wmem_list_t *stat_cmd_arg_list=NULL; +static wmem_list_t *stat_cmd_arg_list; /* structure to keep track of what stats have been specified on the command line. @@ -38,7 +38,7 @@ typedef struct { stat_cmd_arg *sca; char *arg; } stat_requested; -static GSList *stats_requested = NULL; +static GSList *stats_requested; /* ********************************************************************** * Function called from stat to register the stat's command-line argument @@ -141,7 +141,7 @@ start_requested_stats(void) } } -static wmem_tree_t *registered_stat_tables = NULL; +static wmem_tree_t *registered_stat_tables; void register_stat_tap_table_ui(stat_tap_table_ui *ui) { diff --git a/epan/stats_tree.c b/epan/stats_tree.c index 2d76c055c6..454b3325cf 100644 --- a/epan/stats_tree.c +++ b/epan/stats_tree.c @@ -46,7 +46,7 @@ enum _stat_tree_columns { }; /* used to contain the registered stat trees */ -static GHashTable *registry = NULL; +static GHashTable *registry; /* a text representation of a node if buffer is NULL returns a newly allocated string */ diff --git a/epan/tap.c b/epan/tap.c index 79d306f2fb..68782aa3db 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -34,7 +34,7 @@ typedef struct _tap_dissector_t { struct _tap_dissector_t *next; char *name; } tap_dissector_t; -static tap_dissector_t *tap_dissector_list=NULL; +static tap_dissector_t *tap_dissector_list; /* * This is the list of free and used packets queued for a tap. @@ -93,9 +93,9 @@ typedef struct _tap_listener_t { tap_finish_cb finish; } tap_listener_t; -static tap_listener_t *tap_listener_queue=NULL; +static tap_listener_t *tap_listener_queue; -static GSList *tap_plugins = NULL; +static GSList *tap_plugins; #ifdef HAVE_PLUGINS void diff --git a/epan/tvbtest.c b/epan/tvbtest.c index e7dd74afdc..852eeeff97 100644 --- a/epan/tvbtest.c +++ b/epan/tvbtest.c @@ -22,7 +22,7 @@ #include <ws_diag_control.h> -gboolean failed = FALSE; +gboolean failed; typedef struct { struct { diff --git a/epan/uat.c b/epan/uat.c index 6fca2badda..7b73b4a156 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -38,7 +38,7 @@ * instead. */ -static GPtrArray* all_uats = NULL; +static GPtrArray* all_uats; uat_t* uat_new(const char* name, size_t size, diff --git a/epan/wmem_scopes.c b/epan/wmem_scopes.c index d8385d74d6..b5adca928f 100644 --- a/epan/wmem_scopes.c +++ b/epan/wmem_scopes.c @@ -36,9 +36,9 @@ */ /* TODO: Make these thread-local */ -static wmem_allocator_t *packet_scope = NULL; -static wmem_allocator_t *file_scope = NULL; -static wmem_allocator_t *epan_scope = NULL; +static wmem_allocator_t *packet_scope; +static wmem_allocator_t *file_scope; +static wmem_allocator_t *epan_scope; /* Packet Scope */ diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c index 27b9aacaa8..cebcc9e065 100644 --- a/epan/wslua/init_wslua.c +++ b/epan/wslua/init_wslua.c @@ -42,12 +42,12 @@ typedef struct _wslua_plugin { struct _wslua_plugin *next; } wslua_plugin; -static wslua_plugin *wslua_plugin_list = NULL; +static wslua_plugin *wslua_plugin_list; -static lua_State* L = NULL; +static lua_State* L; -static void (*wslua_gui_print_func_ptr)(const char *, void *) = NULL; -static void *wslua_gui_print_data_ptr = NULL; +static void (*wslua_gui_print_func_ptr)(const char *, void *); +static void *wslua_gui_print_data_ptr; static int wslua_lua_print_func_ref = LUA_NOREF; /* XXX: global variables? Really?? Yuck. These could be done differently, @@ -502,7 +502,7 @@ static int init_error_handler(lua_State* LS) { } -static bool init_routine_initialized = false; +static bool init_routine_initialized; static void wslua_init_routine(void) { if ( ! init_routine_initialized ) { @@ -952,8 +952,8 @@ wslua_plugins_dump_all(void) wslua_plugins_get_descriptions(print_wslua_plugin_description, NULL); } -static ei_register_info* ws_lua_ei = NULL; -static int ws_lua_ei_len = 0; +static ei_register_info* ws_lua_ei; +static int ws_lua_ei_len; expert_field* wslua_get_expert_field(const int group, const int severity) diff --git a/epan/wslua/wslua_column.c b/epan/wslua/wslua_column.c index 0156430b48..741d9f8807 100644 --- a/epan/wslua/wslua_column.c +++ b/epan/wslua/wslua_column.c @@ -22,8 +22,8 @@ /* WSLUA_CONTINUE_MODULE Pinfo */ -static GPtrArray* outstanding_Column = NULL; -static GPtrArray* outstanding_Columns = NULL; +static GPtrArray* outstanding_Column; +static GPtrArray* outstanding_Columns; CLEAR_OUTSTANDING(Column,expired, true) CLEAR_OUTSTANDING(Columns,expired, true) diff --git a/epan/wslua/wslua_dumper.c b/epan/wslua/wslua_dumper.c index 160e65c59c..a98d4b9f23 100644 --- a/epan/wslua/wslua_dumper.c +++ b/epan/wslua/wslua_dumper.c @@ -173,7 +173,7 @@ int PseudoHeader_register(lua_State* L) { WSLUA_CLASS_DEFINE(Dumper,FAIL_ON_NULL("Dumper already closed")); -static GHashTable* dumper_encaps = NULL; +static GHashTable* dumper_encaps; #define DUMPER_ENCAP(d) GPOINTER_TO_INT(g_hash_table_lookup(dumper_encaps,d)) static const char* cross_plat_fname(const char* fname) { diff --git a/epan/wslua/wslua_field.c b/epan/wslua/wslua_field.c index 2b3a2fadc0..5408f6cf8f 100644 --- a/epan/wslua/wslua_field.c +++ b/epan/wslua/wslua_field.c @@ -31,7 +31,7 @@ WSLUA_CLASS_DEFINE(FieldInfo,FAIL_ON_NULL_OR_EXPIRED("FieldInfo")); or `Field()` before-hand, or it can be called on new fields created by Lua from a `ProtoField`. */ -static GPtrArray* outstanding_FieldInfo = NULL; +static GPtrArray* outstanding_FieldInfo; FieldInfo* push_FieldInfo(lua_State* L, field_info* f) { FieldInfo fi = (FieldInfo) g_malloc(sizeof(struct _wslua_field_info)); @@ -520,8 +520,8 @@ WSLUA_CLASS_DEFINE(Field,FAIL_ON_NULL("Field")); */ /* Array of Field (struct _wslua_header_field_info*) pointers.*/ -static GPtrArray* wanted_fields = NULL; -static dfilter_t* wslua_dfilter = NULL; +static GPtrArray* wanted_fields; +static dfilter_t* wslua_dfilter; /* We use a fake dfilter for Lua field extractors, so that * epan_dissect_run() will populate the fields. This won't happen @@ -552,7 +552,7 @@ bool wslua_has_field_extractors(void) { * after the fields are primed. */ -static bool fake_tap = false; +static bool fake_tap; void lua_prime_all_fields(proto_tree* tree _U_) { GString* fake_tap_filter = g_string_new("frame"); unsigned i; diff --git a/epan/wslua/wslua_file_handler.c b/epan/wslua/wslua_file_handler.c index e802c86e58..2f6af5db90 100644 --- a/epan/wslua/wslua_file_handler.c +++ b/epan/wslua/wslua_file_handler.c @@ -52,7 +52,7 @@ static GSList *registered_file_handlers; /* During file routines, we cannot allow the FileHandler to get deregistered, since that would change the GArray's in file_access.c and hilarity would ensue. So we set this to true right before pcall(), and back to false afterwards */ -static bool in_routine = false; +static bool in_routine; static void report_error(int *err, char **err_info, const char *fmt, ...) diff --git a/epan/wslua/wslua_gui.c b/epan/wslua/wslua_gui.c index 7707eb583d..261e34e1ca 100644 --- a/epan/wslua/wslua_gui.c +++ b/epan/wslua/wslua_gui.c @@ -18,7 +18,7 @@ /* WSLUA_MODULE Gui GUI Support */ -static const funnel_ops_t* ops = NULL; +static const funnel_ops_t* ops; struct _lua_menu_data { lua_State* L; diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c index 593a1edd10..e8f0d413fa 100644 --- a/epan/wslua/wslua_listener.c +++ b/epan/wslua/wslua_listener.c @@ -191,7 +191,7 @@ static void lua_tap_draw(void *tapdata) { } /* TODO: we should probably use a Lua table here */ -static GPtrArray *listeners = NULL; +static GPtrArray *listeners; static void deregister_Listener (lua_State* L _U_, Listener tap) { if (tap->all_fields) { diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c index 94448139fd..2d1a7afcbd 100644 --- a/epan/wslua/wslua_pinfo.c +++ b/epan/wslua/wslua_pinfo.c @@ -30,8 +30,8 @@ * see comment on wslua_tvb.c */ -static GPtrArray* outstanding_Pinfo = NULL; -static GPtrArray* outstanding_PrivateTable = NULL; +static GPtrArray* outstanding_Pinfo; +static GPtrArray* outstanding_PrivateTable; CLEAR_OUTSTANDING(Pinfo,expired, true) CLEAR_OUTSTANDING(PrivateTable,expired, true) diff --git a/epan/wslua/wslua_proto.c b/epan/wslua/wslua_proto.c index 386c8ad3cd..e056919e4e 100644 --- a/epan/wslua/wslua_proto.c +++ b/epan/wslua/wslua_proto.c @@ -40,7 +40,7 @@ typedef struct _func_saver { int dissect_ref; } func_saver_t; -static GPtrArray* outstanding_FuncSavers = NULL; +static GPtrArray* outstanding_FuncSavers; void clear_outstanding_FuncSavers(void) { while (outstanding_FuncSavers->len) { diff --git a/epan/wslua/wslua_tree.c b/epan/wslua/wslua_tree.c index 628cd3f2ae..035ea46cc1 100644 --- a/epan/wslua/wslua_tree.c +++ b/epan/wslua/wslua_tree.c @@ -23,7 +23,7 @@ static int wslua_ett = -1; -static GPtrArray* outstanding_TreeItem = NULL; +static GPtrArray* outstanding_TreeItem; /* pushing a TreeItem with a NULL item or subtree is completely valid for this function */ diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 892bc5733f..6375a88cb7 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -62,8 +62,8 @@ WSLUA_CLASS_DEFINE(Tvb,FAIL_ON_NULL_OR_EXPIRED("Tvb")); ==== */ -static GPtrArray* outstanding_Tvb = NULL; -static GPtrArray* outstanding_TvbRange = NULL; +static GPtrArray* outstanding_Tvb; +static GPtrArray* outstanding_TvbRange; /* this is used to push Tvbs that were created brand new by wslua code */ int push_wsluaTvb(lua_State* L, Tvb t) { diff --git a/epan/wslua/wslua_utility.c b/epan/wslua/wslua_utility.c index cd726ccea5..13b1f54768 100644 --- a/epan/wslua/wslua_utility.c +++ b/epan/wslua/wslua_utility.c @@ -28,10 +28,10 @@ WSLUA_FUNCTION wslua_get_version(lua_State* L) { /* Gets the Wireshark version a } -static char *current_plugin_version = NULL; -static char *current_plugin_description = NULL; -static char *current_plugin_repository = NULL; -static char *current_plugin_spdx_id = NULL; +static char *current_plugin_version; +static char *current_plugin_description; +static char *current_plugin_repository; +static char *current_plugin_spdx_id; const char* get_current_plugin_version(void) { return current_plugin_version ? current_plugin_version : ""; |