summaryrefslogtreecommitdiff
path: root/src/login/logind-button.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-08 18:58:28 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 08:20:19 +0200
commit7f6e12b03300ba3e473ce6b85d823fc0375b335e (patch)
treec60a5f1afa25a4f5a4fde12ce49047054c489a34 /src/login/logind-button.c
parent66e405837bf250f50472c886f9c7452634ca3776 (diff)
tree-wide: drop redundant if checks before safe_close()
Replace this: if (fd >= 0) safe_close(fd); by this: safe_close(fd);
Diffstat (limited to 'src/login/logind-button.c')
-rw-r--r--src/login/logind-button.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/logind-button.c b/src/login/logind-button.c
index 3324c4622c..92c1b67951 100644
--- a/src/login/logind-button.c
+++ b/src/login/logind-button.c
@@ -239,9 +239,7 @@ int button_open(Button *b) {
assert(b);
- if (b->fd >= 0) {
- b->fd = safe_close(b->fd);
- }
+ b->fd = safe_close(b->fd);
p = strjoina("/dev/input/", b->name);