projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59bcac0
)
watchdog: drop unnecessary variable
author
Lennart Poettering
<lennart@poettering.net>
Mon, 18 Oct 2021 09:26:49 +0000
(11:26 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 18 Oct 2021 09:27:39 +0000
(11:27 +0200)
src/shared/watchdog.c
patch
|
blob
|
history
diff --git
a/src/shared/watchdog.c
b/src/shared/watchdog.c
index c23a4cbac4c07ed4f1c365871846f937d9a6a8f5..4317d90b24d629a7b2616597eccfeca49940827c 100644
(file)
--- a/
src/shared/watchdog.c
+++ b/
src/shared/watchdog.c
@@
-22,12
+22,10
@@
static usec_t watchdog_last_ping = USEC_INFINITY;
static int watchdog_set_enable(bool enable) {
int flags = enable ? WDIOS_ENABLECARD : WDIOS_DISABLECARD;
- int r;
assert(watchdog_fd >= 0);
- r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags);
- if (r < 0) {
+ if (ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags) < 0) {
if (!enable)
return log_warning_errno(errno, "Failed to disable hardware watchdog, ignoring: %m");