diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-24 07:41:45 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-24 09:48:34 +0000 |
| commit | cce396a1ac3786b18f2c21d80c4e65e19481510d (patch) | |
| tree | 0c6aea100e4254cd190640460ddaa39ce120a497 /util/libreboot-utils/lib/state.c | |
| parent | e7ede0c75570ddd57b9d55e33764c3bdd74274b1 (diff) | |
libreboot-utils: general code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/state.c')
| -rw-r--r-- | util/libreboot-utils/lib/state.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/util/libreboot-utils/lib/state.c b/util/libreboot-utils/lib/state.c index a3ad0f1e..b7701f0d 100644 --- a/util/libreboot-utils/lib/state.c +++ b/util/libreboot-utils/lib/state.c @@ -204,28 +204,13 @@ exit_cleanup(void) if (x != NULL) { f = &x->f; - if (f->gbe_fd > -1) { - if (close_on_eintr(f->gbe_fd) == -1) { - f->gbe_fd = -1; - close_err = 1; - } - f->gbe_fd = -1; - } - - if (f->tmp_fd > -1) { - if (close_on_eintr(f->tmp_fd) == -1) { - f->tmp_fd = -1; - close_err = 1; - } - f->tmp_fd = -1; - } + close_no_err(&f->gbe_fd); + close_no_err(&f->tmp_fd); + close_no_err(&f->tmp_fd); - if (f->tname != NULL) { + if (f->tname != NULL) if (unlink(f->tname) == -1) close_err = 1; - } - - f->tmp_fd = -1; } if (saved_errno) |
