From 78c1e60e71a9f94ab54ad361624d7ac8e8fa5362 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Tue, 13 Aug 2013 10:32:00 +0900 Subject: [PATCH] Check the return value of close.(missing one) [model] Redwood [binary_type] AP [customer] Docomo/Orange/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: Ibf6ab1299bcb6f09371856b02e7a610752405348 --- src/fb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fb.c b/src/fb.c index f37a33f..89c19a4 100644 --- a/src/fb.c +++ b/src/fb.c @@ -144,7 +144,9 @@ static inline int sync_for_file(struct fb_info *info) if (read(fd, buffer->data, info->bufsz) != info->bufsz) { ErrPrint("read: %s\n", strerror(errno)); - close(fd); + if (close(fd) < 0) { + ErrPrint("close: %s\n", strerror(errno)); + } /*! * \note @@ -156,7 +158,9 @@ static inline int sync_for_file(struct fb_info *info) return LB_STATUS_SUCCESS; } - close(fd); + if (close(fd) < 0) { + ErrPrint("close: %s\n", strerror(errno)); + } return LB_STATUS_SUCCESS; } -- 2.7.4