Skip to content

Commit

Permalink
Merge pull request #152 from wenningerk/coverity_issues
Browse files Browse the repository at this point in the history
Refactor: some issue pointed to by coverity
  • Loading branch information
wenningerk authored Oct 4, 2023
2 parents 5ec38cf + 05e1b4a commit 8cd0885
Show file tree
Hide file tree
Showing 7 changed files with 711 additions and 634 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AM_CPPFLAGS = -I$(includedir)/pacemaker \

sbin_PROGRAMS = sbd

sbd_SOURCES = sbd-common.c sbd-inquisitor.c sbd-pacemaker.c sbd-cluster.c setproctitle.c sbd.h sbd.sysconfig
sbd_SOURCES = sbd-common.c sbd-watchdog.c sbd-inquisitor.c sbd-pacemaker.c sbd-cluster.c setproctitle.c sbd.h sbd.sysconfig

if SUPPORT_SHARED_DISK
sbd_SOURCES += sbd-md.c
Expand Down
8 changes: 4 additions & 4 deletions src/sbd-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ sbd_cpg_membership_health_update()
set_servant_health(pcmk_health_noquorum, LOG_WARNING,
"Connected to %s but quorum using qdevice is distrusted "
"for SBD as qdevice-sync_timeout (%ds) > watchdog-timeout "
"(%lus).",
"(%us).",
name_for_cluster_type(get_cluster_type()),
qdevice_sync_timeout, timeout_watchdog
);
break;
}
#endif
set_servant_health(pcmk_health_online, LOG_INFO,
"Connected to %s (%u members)%s",
"Connected to %s (%d members)%s",
name_for_cluster_type(get_cluster_type()),
cpg_membership_entries,
#if CHECK_QDEVICE_SYNC_TIMEOUT
Expand Down Expand Up @@ -710,9 +710,9 @@ find_pacemaker_remote(void)
}

/* entry_name is truncated to 16 characters including the nul terminator */
cl_log(LOG_DEBUG, "Found %s at %u", entry_name, pid);
cl_log(LOG_DEBUG, "Found %s at %d", entry_name, pid);
if (strncmp(entry_name, PACEMAKER_REMOTE_BINARY, 15) == 0) {
cl_log(LOG_NOTICE, "Found Pacemaker Remote at PID %u", pid);
cl_log(LOG_NOTICE, "Found Pacemaker Remote at PID %d", pid);
remoted_pid = pid;
remote_node = true;
break;
Expand Down
Loading

0 comments on commit 8cd0885

Please sign in to comment.