[pve-devel] [PATCH ha-manager 1/3] watchdog: separate if in two parts
Maximiliano Sandoval
m.sandoval at proxmox.com
Mon May 19 15:09:33 CEST 2025
The sole purpose of this commit is to make the following commit's diff
easier to read.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
src/watchdog-mux.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/watchdog-mux.c b/src/watchdog-mux.c
index b4bcc0c..a9017b3 100644
--- a/src/watchdog-mux.c
+++ b/src/watchdog-mux.c
@@ -243,13 +243,11 @@ main(void)
int i;
time_t ctime = time(NULL);
for (i = 0; i < MAX_CLIENTS; i++) {
- if (
- client_list[i].fd != 0
- && client_list[i].time != 0
- && ((ctime - client_list[i].time) > client_watchdog_timeout)
- ) {
- update_watchdog = 0;
- fprintf(stderr, "client watchdog expired - disable watchdog updates\n");
+ if (client_list[i].fd != 0 && client_list[i].time != 0) {
+ if ((ctime - client_list[i].time) > client_watchdog_timeout) {
+ update_watchdog = 0;
+ fprintf(stderr, "client watchdog expired - disable watchdog updates\n");
+ }
}
}
}
--
2.39.5
More information about the pve-devel
mailing list