From d187c1d63be85ae0d0f7720a0b449de870c3723f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 10 Feb 2015 21:00:57 +0100 Subject: [PATCH] Clarify that uc_read_fd always close() the descriptor --- include/ucore/read_file.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ucore/read_file.h b/include/ucore/read_file.h index e105b45..9d83a46 100644 --- a/include/ucore/read_file.h +++ b/include/ucore/read_file.h @@ -25,6 +25,8 @@ uc_read_file(const char *file_name, size_t *length, size_t max); * @see uc_read_file * This is similar but reads from a file descriptor, * of any type as long as it supports the read() call. + * + * uc_read_fd close() the fd in all cases before it returns */ char * uc_read_fd(int fd, size_t *length, size_t max);