[pve-devel] [PATCH ha-manager v2 2/5] watchdog-mux: split if block in two if blocks
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Jun 25 15:23:46 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 | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/watchdog-mux.c b/src/watchdog-mux.c
index d38116b..2b8cebf 100644
--- a/src/watchdog-mux.c
+++ b/src/watchdog-mux.c
@@ -234,10 +234,11 @@ int 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