mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Fix warnings in firmware/screendump.c
Change-Id: If01caf8a124e925b308bdefc6327420dde355ac9
This commit is contained in:
parent
17ee90ccdb
commit
55f1d9486f
1 changed files with 10 additions and 2 deletions
|
@ -140,7 +140,11 @@ void screen_dump(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
write(fd, bmpheader, sizeof(bmpheader));
|
if(write(fd, bmpheader, sizeof(bmpheader)) != sizeof(bmpheader))
|
||||||
|
{
|
||||||
|
close(fd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* BMP image goes bottom up */
|
/* BMP image goes bottom up */
|
||||||
for (y = LCD_HEIGHT - 1; y >= 0; y--)
|
for (y = LCD_HEIGHT - 1; y >= 0; y--)
|
||||||
|
@ -243,7 +247,11 @@ void screen_dump(void)
|
||||||
while (dst < dst_end);
|
while (dst < dst_end);
|
||||||
|
|
||||||
#endif /* LCD_DEPTH */
|
#endif /* LCD_DEPTH */
|
||||||
write(fd, linebuf, DUMP_BMP_LINESIZE);
|
if(write(fd, linebuf, DUMP_BMP_LINESIZE) != DUMP_BMP_LINESIZE)
|
||||||
|
{
|
||||||
|
close(fd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue