From dcd27abcc4471ac04d7f196905907eb9a28bf0d8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 5 Oct 2009 03:03:07 +0200 Subject: unpackers: check errors from close() too Signed-off-by: Denys Vlasenko --- include/libbb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index a02355cc5..dca14b40d 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -631,6 +631,9 @@ extern void xwrite(int fd, const void *buf, size_t count) FAST_FUNC; extern void xwrite_str(int fd, const char *str) FAST_FUNC; extern void xopen_xwrite_close(const char* file, const char *str) FAST_FUNC; +/* Close fd, but check for failures (some types of write errors) */ +extern void xclose(int fd) FAST_FUNC; + /* Reads and prints to stdout till eof, then closes FILE. Exits on error: */ extern void xprint_and_close_file(FILE *file) FAST_FUNC; -- cgit v1.2.3