Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
333d7fb
Refactor: various: Replace gint with int
nrwahl2 Apr 14, 2026
24f81c1
Refactor: various: Replace G_MAXUINT with UINT_MAX
nrwahl2 Apr 14, 2026
106e462
Refactor: libpe_status: Clean up includes in internal.h
nrwahl2 Apr 15, 2026
40b727b
Refactor: libpe_status: Clean up includes in pe_types.h
nrwahl2 Apr 15, 2026
cec2eeb
Refactor: libpe_status: Clean up includes in bundle.c
nrwahl2 Apr 15, 2026
f649058
Refactor: libpe_status: Clean up includes in clone.c
nrwahl2 Apr 14, 2026
3c880d1
Refactor: libpe_status: Clean up includes in complex.c
nrwahl2 Apr 14, 2026
e55f8af
Refactor: libpe_status: Clean up includes in failcounts.c
nrwahl2 Apr 15, 2026
611b249
Refactor: libpe_status: Clean up includes in group.c
nrwahl2 Apr 15, 2026
e91a294
Refactor: libpe_status: Clean up includes in native.c
nrwahl2 Apr 15, 2026
fd59717
Refactor: libpe_status: Clean up includes in pe_actions.c
nrwahl2 Apr 14, 2026
14dc00f
Refactor: libpe_status: Clean up includes in pe_digest.c
nrwahl2 Apr 15, 2026
37b2607
Refactor: libpe_status: Clean up includes in pe_health.c
nrwahl2 Apr 15, 2026
5309c96
Refactor: libpe_status: Clean up includes in pe_notif.c
nrwahl2 Apr 15, 2026
b4ff7a9
Refactor: libpe_status: Clean up includes in pe_output.c
nrwahl2 Apr 14, 2026
eae2f9d
Refactor: libpe_status: Clean up includes in remote.c
nrwahl2 Apr 15, 2026
d8b0c1e
Refactor: libpe_status: Clean up includes in status.c
nrwahl2 Apr 15, 2026
1638bac
Refactor: libpe_status: Clean up includes in unpack.c
nrwahl2 Apr 14, 2026
0f1080d
Refactor: libpe_status: Clean up includes in utils.c
nrwahl2 Apr 15, 2026
a1c0ac1
Refactor: libstonithd: Clean up includes in st_output.c
nrwahl2 Apr 15, 2026
07e4ec2
Refactor: libpacemaker: Clean up includes in pcmk_output.c
nrwahl2 Apr 15, 2026
44a6be8
Refactor: libpacemaker: Clean up includes in pcmk_resource.c
nrwahl2 Apr 15, 2026
b503507
Refactor: libpacemaker: Clean up includes in pcmk_rule.c
nrwahl2 Apr 15, 2026
e90615e
Refactor: libpacemaker: Clean up includes in pcmk_status.c
nrwahl2 Apr 15, 2026
1844d36
Refactor: libpacemaker: Clean up includes in pcmk_ticket.c
nrwahl2 Apr 15, 2026
7e4900c
Refactor: scheduler: Add missing includes to pacemaker-schedulerd.c
nrwahl2 Apr 15, 2026
e1ee371
Refactor: various: Replace guint with unsigned int
nrwahl2 Apr 14, 2026
f305802
Refactor: libcrmcommon: Rename pcmk__xe_get_guint to pcmk__xe_get_uint
nrwahl2 Apr 15, 2026
f4618cf
Refactor: libcrmcommon: Rename pcmk__xe_set_guint to pcmk__xe_set_uint
nrwahl2 Apr 15, 2026
f25e6dc
Refactor: libcrmcommon: pcmk__guint_from_hash -> pcmk__uint_from_hash
nrwahl2 Apr 15, 2026
79a8ecb
Low: libcrmcluster: Add missing glib.h include to compat.h
nrwahl2 Apr 15, 2026
ade3221
Refactor: various: Replace gpointer with void *
nrwahl2 Apr 15, 2026
5002124
Refactor: various: Replace gconstpointer with const void *
nrwahl2 Apr 15, 2026
ddae361
Refactor: various: Replace gchar with char for function input arguments
nrwahl2 Apr 15, 2026
9dbddd9
API: libpacemaker: pcmk_free_injections() calls free instead of g_free
nrwahl2 Apr 15, 2026
f3319b0
Refactor: various: Replace const gchar with const char
nrwahl2 Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions daemons/attrd/attrd_alerts.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2025 the Pacemaker project contributors
* Copyright 2015-2026 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
Expand Down Expand Up @@ -103,7 +103,7 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void
}

gboolean
attrd_read_options(gpointer user_data)
attrd_read_options(void *user_data)
{
int call_id;

Expand Down
6 changes: 3 additions & 3 deletions daemons/attrd/attrd_attributes.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2025 the Pacemaker project contributors
* Copyright 2013-2026 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
Expand Down Expand Up @@ -172,9 +172,9 @@ attrd_clear_value_seen(void)
attribute_value_t *v = NULL;

g_hash_table_iter_init(&aIter, attributes);
while (g_hash_table_iter_next(&aIter, NULL, (gpointer *) & a)) {
while (g_hash_table_iter_next(&aIter, NULL, (void **) &a)) {
g_hash_table_iter_init(&vIter, a->values);
while (g_hash_table_iter_next(&vIter, NULL, (gpointer *) & v)) {
while (g_hash_table_iter_next(&vIter, NULL, (void **) &v)) {
attrd_clear_value_flags(v, attrd_value_from_peer);
}
}
Expand Down
12 changes: 6 additions & 6 deletions daemons/attrd/attrd_cib.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static int last_cib_op_done = 0;
static void write_attribute(attribute_t *a, bool ignore_delay);

static void
attrd_cib_destroy_cb(gpointer user_data)
attrd_cib_destroy_cb(void *user_data)
{
cib_t *cib = user_data;

Expand Down Expand Up @@ -235,7 +235,7 @@ attrd_cib_init(void)
}

static gboolean
attribute_timer_cb(gpointer data)
attribute_timer_cb(void *data)
{
attribute_t *a = data;
pcmk__trace("Dampen interval expired for %s", a->id);
Expand Down Expand Up @@ -287,7 +287,7 @@ attrd_cib_callback(xmlNode *msg, int call_id, int rc, xmlNode *output, void *use
call_id, a->id, pcmk_strerror(rc), rc);

g_hash_table_iter_init(&iter, a->values);
while (g_hash_table_iter_next(&iter, (gpointer *) & peer, (gpointer *) & v)) {
while (g_hash_table_iter_next(&iter, (void **) &peer, (void **) &v)) {
if (rc == pcmk_ok) {
pcmk__info("* Wrote %s[%s]=%s", a->id, peer,
pcmk__s(v->requested, "(unset)"));
Expand Down Expand Up @@ -447,7 +447,7 @@ send_alert_attributes_value(attribute_t *a, GHashTable *t)

g_hash_table_iter_init(&vIter, t);

while (g_hash_table_iter_next(&vIter, NULL, (gpointer *) & at)) {
while (g_hash_table_iter_next(&vIter, NULL, (void **) &at)) {
const char *node_xml_id = attrd_get_node_xml_id(at->nodename);
const char *failed_s = NULL;

Expand Down Expand Up @@ -572,7 +572,7 @@ write_attribute(attribute_t *a, bool ignore_delay)

/* Iterate over each peer value of this attribute */
g_hash_table_iter_init(&iter, a->values);
while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &v)) {
while (g_hash_table_iter_next(&iter, NULL, (void **) &v)) {
const char *node_xml_id = NULL;
const char *prev_xml_id = NULL;

Expand Down Expand Up @@ -692,7 +692,7 @@ attrd_write_attributes(uint32_t options)
pcmk__debug("Writing out %s attributes",
pcmk__is_set(options, attrd_write_all)? "all" : "changed");
g_hash_table_iter_init(&iter, attributes);
while (g_hash_table_iter_next(&iter, NULL, (gpointer *) & a)) {
while (g_hash_table_iter_next(&iter, NULL, (void **) &a)) {
if (!pcmk__is_set(options, attrd_write_all)
&& pcmk__is_set(a->flags, attrd_attr_node_unknown)) {
// Try writing this attribute again, in case peer ID was learned
Expand Down
20 changes: 10 additions & 10 deletions daemons/attrd/attrd_corosync.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ attrd_cpg_dispatch(cpg_handle_t handle, const struct cpg_name *group_name,
* \param[in] unused Unused
*/
static void
attrd_cpg_destroy(gpointer unused)
attrd_cpg_destroy(void *unused)
{
if (attrd_shutting_down()) {
pcmk__info("Disconnected from Corosync process group");
Expand Down Expand Up @@ -433,7 +433,7 @@ attrd_peer_update_one(const pcmk__node_status_t *peer, xmlNode *xml,
pcmk__xe_remove_attr(xml, PCMK__XA_ATTR_HOST_ID);
g_hash_table_iter_init(&vIter, a->values);

while (g_hash_table_iter_next(&vIter, (gpointer *) & host, NULL)) {
while (g_hash_table_iter_next(&vIter, (void **) &host, NULL)) {
update_attr_on_host(a, peer, xml, attr, value, host, filter);
}

Expand All @@ -460,10 +460,10 @@ broadcast_unseen_local_values(void)
xmlNode *sync = NULL;

g_hash_table_iter_init(&aIter, attributes);
while (g_hash_table_iter_next(&aIter, NULL, (gpointer *) & a)) {
while (g_hash_table_iter_next(&aIter, NULL, (void **) &a)) {

g_hash_table_iter_init(&vIter, a->values);
while (g_hash_table_iter_next(&vIter, NULL, (gpointer *) & v)) {
while (g_hash_table_iter_next(&vIter, NULL, (void **) &v)) {

if (!pcmk__is_set(v->flags, attrd_value_from_peer)
&& pcmk__str_eq(v->nodename, attrd_cluster->priv->node_name,
Expand Down Expand Up @@ -527,7 +527,7 @@ attrd_peer_clear_failure(pcmk__request_t *request)
const char *host = pcmk__xe_get(xml, PCMK__XA_ATTR_HOST);
const char *op = pcmk__xe_get(xml, PCMK__XA_ATTR_CLEAR_OPERATION);
const char *interval_spec = pcmk__xe_get(xml, PCMK__XA_ATTR_CLEAR_INTERVAL);
guint interval_ms = 0U;
unsigned int interval_ms = 0;
char *attr = NULL;
GHashTableIter iter;
regex_t regex;
Expand All @@ -550,7 +550,7 @@ attrd_peer_clear_failure(pcmk__request_t *request)
pcmk__xe_remove_attr(xml, PCMK__XA_ATTR_VALUE);

g_hash_table_iter_init(&iter, attributes);
while (g_hash_table_iter_next(&iter, (gpointer *) &attr, NULL)) {
while (g_hash_table_iter_next(&iter, (void **) &attr, NULL)) {
if (regexec(&regex, attr, 0, NULL, 0) == 0) {
pcmk__trace("Matched %s when clearing %s", attr,
pcmk__s(rsc, "all resources"));
Expand Down Expand Up @@ -616,7 +616,7 @@ attrd_erase_removed_peer_attributes(void)
}

g_hash_table_iter_init(&iter, removed_peers);
while (g_hash_table_iter_next(&iter, (gpointer *) &host, NULL)) {
while (g_hash_table_iter_next(&iter, (void **) &host, NULL)) {
attrd_cib_erase_transient_attrs(host);
g_hash_table_iter_remove(&iter);
}
Expand All @@ -642,7 +642,7 @@ attrd_peer_remove(const char *host, bool uncache, const char *source)
host, source, (uncache? "and" : "without"));

g_hash_table_iter_init(&aIter, attributes);
while (g_hash_table_iter_next(&aIter, NULL, (gpointer *) & a)) {
while (g_hash_table_iter_next(&aIter, NULL, (void **) &a)) {
if(g_hash_table_remove(a->values, host)) {
pcmk__debug("Removed %s[%s] for peer %s", a->id, host, source);
}
Expand Down Expand Up @@ -702,9 +702,9 @@ attrd_peer_sync(pcmk__node_status_t *peer)
pcmk__xe_set(sync, PCMK_XA_TASK, PCMK__ATTRD_CMD_SYNC_RESPONSE);

g_hash_table_iter_init(&aIter, attributes);
while (g_hash_table_iter_next(&aIter, NULL, (gpointer *) & a)) {
while (g_hash_table_iter_next(&aIter, NULL, (void **) &a)) {
g_hash_table_iter_init(&vIter, a->values);
while (g_hash_table_iter_next(&vIter, NULL, (gpointer *) & v)) {
while (g_hash_table_iter_next(&vIter, NULL, (void **) &v)) {
pcmk__debug("Syncing %s[%s]='%s' to %s", a->id, v->nodename,
readable_value(v), readable_peer(peer));
attrd_add_value_xml(sync, a, v, false);
Expand Down
6 changes: 3 additions & 3 deletions daemons/attrd/attrd_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static xmlNode *build_query_reply(const char *attr, const char *host)
GHashTableIter iter;

g_hash_table_iter_init(&iter, a->values);
while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &v)) {
while (g_hash_table_iter_next(&iter, NULL, (void **) &v)) {
host_value = pcmk__xe_create(reply, PCMK_XE_NODE);
pcmk__xe_set(host_value, PCMK__XA_ATTR_HOST, v->nodename);
pcmk__xe_set(host_value, PCMK__XA_ATTR_VALUE, v->current);
Expand Down Expand Up @@ -114,7 +114,7 @@ attrd_client_clear_failure(pcmk__request_t *request)
pattern = pcmk__assert_asprintf(ATTRD_RE_CLEAR_ONE, rsc);

} else {
guint interval_ms = 0U;
unsigned int interval_ms = 0;

pcmk_parse_interval_spec(interval_spec, &interval_ms);
pattern = pcmk__assert_asprintf(ATTRD_RE_CLEAR_OP, rsc, op,
Expand Down Expand Up @@ -257,7 +257,7 @@ expand_regexes(xmlNode *xml, const char *attr, const char *value, const char *re
}

g_hash_table_iter_init(&aIter, attributes);
while (g_hash_table_iter_next(&aIter, (gpointer *) & attr, NULL)) {
while (g_hash_table_iter_next(&aIter, (void **) &attr, NULL)) {
int status = regexec(&r_patt, attr, 0, NULL, 0);

if (status == 0) {
Expand Down
17 changes: 9 additions & 8 deletions daemons/attrd/attrd_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ next_key(void)
}

static void
free_waitlist_node(gpointer data)
free_waitlist_node(void *data)
{
struct waitlist_node *wl = (struct waitlist_node *) data;

Expand Down Expand Up @@ -196,7 +196,7 @@ void
attrd_remove_client_from_waitlist(pcmk__client_t *client)
{
GHashTableIter iter;
gpointer value;
void *value = NULL;

if (waitlist == NULL) {
return;
Expand Down Expand Up @@ -231,7 +231,7 @@ void
attrd_ack_waitlist_clients(enum attrd_sync_point sync_point, const xmlNode *xml)
{
int callid;
gpointer value;
void *value = NULL;

if (waitlist == NULL) {
return;
Expand Down Expand Up @@ -337,7 +337,7 @@ attrd_request_has_sync_point(xmlNode *xml)
}

static void
free_action(gpointer data)
free_action(void *data)
{
struct confirmation_action *action = (struct confirmation_action *) data;
g_list_free_full(action->respondents, free);
Expand All @@ -353,12 +353,12 @@ free_action(gpointer data)
* cleared of things that didn't complete.
*/
static gboolean
confirmation_timeout_cb(gpointer data)
confirmation_timeout_cb(void *data)
{
struct confirmation_action *action = (struct confirmation_action *) data;

GHashTableIter iter;
gpointer value;
void *value = NULL;

if (expected_confirmations == NULL) {
return G_SOURCE_REMOVE;
Expand Down Expand Up @@ -431,7 +431,7 @@ void
attrd_do_not_wait_for_client(pcmk__client_t *client)
{
GHashTableIter iter;
gpointer value;
void *value = NULL;

if (expected_confirmations == NULL) {
return;
Expand Down Expand Up @@ -476,7 +476,8 @@ attrd_expect_confirmations(pcmk__request_t *request, attrd_confirmation_action_f
{
struct confirmation_action *action = NULL;
GHashTableIter iter;
gpointer host, ver;
void *host = NULL;
void *ver = NULL;
GList *respondents = NULL;
int callid;

Expand Down
6 changes: 3 additions & 3 deletions daemons/attrd/attrd_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ attrd_expand_value(const char *value, const char *old_value)
*/
int
attrd_failure_regex(regex_t *regex, const char *rsc, const char *op,
guint interval_ms)
unsigned int interval_ms)
{
char *pattern = NULL;
int rc;
Expand All @@ -193,7 +193,7 @@ attrd_failure_regex(regex_t *regex, const char *rsc, const char *op,
}

void
attrd_free_attribute_value(gpointer data)
attrd_free_attribute_value(void *data)
{
attribute_value_t *v = data;

Expand All @@ -204,7 +204,7 @@ attrd_free_attribute_value(gpointer data)
}

void
attrd_free_attribute(gpointer data)
attrd_free_attribute(void *data)
{
attribute_t *a = data;
if(a) {
Expand Down
8 changes: 4 additions & 4 deletions daemons/attrd/pacemaker-attrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int attrd_expand_value(const char *value, const char *old_value);
#define ATTRD_RE_CLEAR_OP ATTRD_RE_CLEAR_ALL "%s#%s_%u$"

int attrd_failure_regex(regex_t *regex, const char *rsc, const char *op,
guint interval_ms);
unsigned int interval_ms);

extern cib_t *the_cib;
extern crm_exit_t attrd_exit_status;
Expand All @@ -100,7 +100,7 @@ extern lrmd_t *the_lrmd;
extern crm_trigger_t *attrd_config_read;

void attrd_lrmd_disconnect(void);
gboolean attrd_read_options(gpointer user_data);
gboolean attrd_read_options(void *user_data);
int attrd_send_attribute_alert(const char *node, const char *node_xml_id,
const char *attr, const char *value);

Expand Down Expand Up @@ -216,8 +216,8 @@ gboolean attrd_send_message(const pcmk__node_status_t *node, xmlNode *data,
xmlNode *attrd_add_value_xml(xmlNode *parent, const attribute_t *a,
const attribute_value_t *v, bool force_write);
void attrd_clear_value_seen(void);
void attrd_free_attribute(gpointer data);
void attrd_free_attribute_value(gpointer data);
void attrd_free_attribute(void *data);
void attrd_free_attribute_value(void *data);
attribute_t *attrd_populate_attribute(xmlNode *xml, const char *attr);
char *attrd_set_id(const attribute_t *attr, const char *node_state_id);
char *attrd_nvpair_id(const attribute_t *attr, const char *node_state_id);
Expand Down
8 changes: 4 additions & 4 deletions daemons/based/based_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <time.h> // time_t
#include <unistd.h> // close

#include <glib.h> // gboolean, gpointer, g_*, etc.
#include <glib.h> // gboolean, g_*, etc.
#include <libxml/tree.h> // xmlNode
#include <qb/qbdefs.h> // QB_FALSE
#include <qb/qbipcs.h> // qb_ipcs_connection_t
Expand Down Expand Up @@ -165,7 +165,7 @@ do_local_notify(const xmlNode *xml, const char *client_id, bool sync_reply,
* \return \c G_SOURCE_REMOVE (to destroy the timeout)
*/
static gboolean
digest_timer_cb(gpointer data)
digest_timer_cb(void *data)
{
char *buf = NULL;
xmlNode *ping = NULL;
Expand Down Expand Up @@ -904,7 +904,7 @@ based_peer_callback(xmlNode *msg, void *private_data)
}

static gboolean
cib_force_exit(gpointer data)
cib_force_exit(void *data)
{
pcmk__notice("Exiting immediately after %s without shutdown acknowledgment",
pcmk__readable_interval(EXIT_ESCALATION_MS));
Expand All @@ -913,7 +913,7 @@ cib_force_exit(gpointer data)
}

static void
disconnect_remote_client(gpointer key, gpointer value, gpointer user_data)
disconnect_remote_client(void *key, void *value, void *user_data)
{
pcmk__client_t *a_client = value;

Expand Down
2 changes: 1 addition & 1 deletion daemons/based/based_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ write_cib_cb(mainloop_child_t *child, int core, int signo, int exit_code)
* \param[in] user_data Ignored
*/
static int
write_cib_async(gpointer user_data)
write_cib_async(void *user_data)
{
int rc = pcmk_rc_ok;
pid_t pid = 0;
Expand Down
4 changes: 2 additions & 2 deletions daemons/based/based_notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdint.h> // int32_t, uint16_t, UINT64_C
#include <sys/types.h> // ssize_t

#include <glib.h> // gpointer, g_string_free
#include <glib.h> // g_*, etc.
#include <libxml/tree.h> // xmlNode
#include <qb/qblog.h> // QB_XS

Expand Down Expand Up @@ -107,7 +107,7 @@ based_update_notify_flags(const xmlNode *xml, pcmk__client_t *client)
}

static void
cib_notify_send_one(gpointer key, gpointer value, gpointer user_data)
cib_notify_send_one(void *key, void *value, void *user_data)
{
const char *type = NULL;
int rc = pcmk_rc_ok;
Expand Down
Loading