diff options
author | Franklin Wei <frankhwei536@gmail.com> | 2015-02-24 16:55:26 -0500 |
---|---|---|
committer | Franklin Wei <frankhwei536@gmail.com> | 2015-02-24 16:55:26 -0500 |
commit | 55f1d9486fcff6ae7af6cac3a0200a996c194c6c (patch) | |
tree | d95330141e832f9cac5913e4bedaab505c048b4c /firmware/screendump.c | |
parent | 17ee90ccdb75f5e707604a1f4b28340aab072ec1 (diff) | |
download | rockbox-55f1d9486fcff6ae7af6cac3a0200a996c194c6c.tar.gz rockbox-55f1d9486fcff6ae7af6cac3a0200a996c194c6c.zip |
Fix warnings in firmware/screendump.c
Change-Id: If01caf8a124e925b308bdefc6327420dde355ac9
Diffstat (limited to 'firmware/screendump.c')
-rw-r--r-- | firmware/screendump.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/screendump.c b/firmware/screendump.c index e27360b137..226d08a390 100644 --- a/firmware/screendump.c +++ b/firmware/screendump.c | |||
@@ -140,7 +140,11 @@ void screen_dump(void) | |||
140 | } | 140 | } |
141 | else | 141 | else |
142 | { | 142 | { |
143 | write(fd, bmpheader, sizeof(bmpheader)); | 143 | if(write(fd, bmpheader, sizeof(bmpheader)) != sizeof(bmpheader)) |
144 | { | ||
145 | close(fd); | ||
146 | return; | ||
147 | } | ||
144 | 148 | ||
145 | /* BMP image goes bottom up */ | 149 | /* BMP image goes bottom up */ |
146 | for (y = LCD_HEIGHT - 1; y >= 0; y--) | 150 | for (y = LCD_HEIGHT - 1; y >= 0; y--) |
@@ -243,7 +247,11 @@ void screen_dump(void) | |||
243 | while (dst < dst_end); | 247 | while (dst < dst_end); |
244 | 248 | ||
245 | #endif /* LCD_DEPTH */ | 249 | #endif /* LCD_DEPTH */ |
246 | write(fd, linebuf, DUMP_BMP_LINESIZE); | 250 | if(write(fd, linebuf, DUMP_BMP_LINESIZE) != DUMP_BMP_LINESIZE) |
251 | { | ||
252 | close(fd); | ||
253 | return; | ||
254 | } | ||
247 | } | 255 | } |
248 | } | 256 | } |
249 | close(fd); | 257 | close(fd); |