summaryrefslogtreecommitdiffstats
path: root/epan/register.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/register.c
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--epan/register.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/register.c b/epan/register.c
index 1f8f2c2f..97d3e626 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
@@ -38,7 +38,7 @@ register_all_protocols_worker(void *arg _U_)
void *volatile error_message = NULL;
TRY {
- for (gulong i = 0; i < dissector_reg_proto_count; i++) {
+ for (unsigned long i = 0; i < dissector_reg_proto_count; i++) {
set_cb_name(dissector_reg_proto[i].cb_name);
dissector_reg_proto[i].cb_func();
}
@@ -57,16 +57,16 @@ register_all_protocols_worker(void *arg _U_)
}
ENDTRY;
- g_async_queue_push(register_cb_done_q, GINT_TO_POINTER(TRUE));
+ g_async_queue_push(register_cb_done_q, GINT_TO_POINTER(true));
return (void *) error_message;
}
void
-register_all_protocols(register_cb cb, gpointer cb_data)
+register_all_protocols(register_cb cb, void *cb_data)
{
const char *cb_name;
register_cb_done_q = g_async_queue_new();
- gboolean called_back = FALSE;
+ bool called_back = false;
GThread *rapw_thread;
const char *error_message;
@@ -77,7 +77,7 @@ register_all_protocols(register_cb cb, gpointer cb_data)
g_mutex_unlock(&cur_cb_name_mtx);
if (cb && cb_name) {
cb(RA_REGISTER, cb_name, cb_data);
- called_back = TRUE;
+ called_back = true;
}
}
error_message = (const char *) g_thread_join(rapw_thread);
@@ -94,7 +94,7 @@ register_all_protocol_handoffs_worker(void *arg _U_)
void *volatile error_message = NULL;
TRY {
- for (gulong i = 0; i < dissector_reg_handoff_count; i++) {
+ for (unsigned long i = 0; i < dissector_reg_handoff_count; i++) {
set_cb_name(dissector_reg_handoff[i].cb_name);
dissector_reg_handoff[i].cb_func();
}
@@ -113,15 +113,15 @@ register_all_protocol_handoffs_worker(void *arg _U_)
}
ENDTRY;
- g_async_queue_push(register_cb_done_q, GINT_TO_POINTER(TRUE));
+ g_async_queue_push(register_cb_done_q, GINT_TO_POINTER(true));
return (void *) error_message;
}
void
-register_all_protocol_handoffs(register_cb cb, gpointer cb_data)
+register_all_protocol_handoffs(register_cb cb, void *cb_data)
{
const char *cb_name;
- gboolean called_back = FALSE;
+ bool called_back = false;
GThread *raphw_thread;
const char *error_message;
@@ -133,7 +133,7 @@ register_all_protocol_handoffs(register_cb cb, gpointer cb_data)
g_mutex_unlock(&cur_cb_name_mtx);
if (cb && cb_name) {
cb(RA_HANDOFF, cb_name, cb_data);
- called_back = TRUE;
+ called_back = true;
}
}
error_message = (const char *) g_thread_join(raphw_thread);
@@ -145,7 +145,7 @@ register_all_protocol_handoffs(register_cb cb, gpointer cb_data)
g_async_queue_unref(register_cb_done_q);
}
-gulong register_count(void)
+unsigned long register_count(void)
{
return dissector_reg_proto_count + dissector_reg_handoff_count;
}