chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
journal: initialize libgcrypt explicitly, before using HMAC
[elogind.git]
/
src
/
login
/
logind-button.c
diff --git
a/src/login/logind-button.c
b/src/login/logind-button.c
index 8b59c2b0c36be02f961af1aa5b5b35605f463a04..d023294a5919b9bc1477674b8d58b8a15ac4c70b 100644
(file)
--- a/
src/login/logind-button.c
+++ b/
src/login/logind-button.c
@@
-107,10
+107,8
@@
int button_open(Button *b) {
}
p = strappend("/dev/input/", b->name);
- if (!p) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!p)
+ return log_oom();
b->fd = open(p, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK);
free(p);