From 7f6e12b03300ba3e473ce6b85d823fc0375b335e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 8 Sep 2015 18:58:28 +0200 Subject: tree-wide: drop redundant if checks before safe_close() Replace this: if (fd >= 0) safe_close(fd); by this: safe_close(fd); --- src/login/logind-button.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/login/logind-button.c') 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); -- cgit v1.2.3-54-g00ecf