forked from len0rd/rockbox
Fix rockbox warnings. sramfile is a static array so will never be NULL.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14648 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e847054e63
commit
b0a1ed1852
1 changed files with 2 additions and 2 deletions
|
@ -225,7 +225,7 @@ int sram_load(void)
|
||||||
int fd;
|
int fd;
|
||||||
char meow[500];
|
char meow[500];
|
||||||
|
|
||||||
if (!mbc.batt || !sramfile || !*sramfile) return -1;
|
if (!mbc.batt || !*sramfile) return -1;
|
||||||
|
|
||||||
/* Consider sram loaded at this point, even if file doesn't exist */
|
/* Consider sram loaded at this point, even if file doesn't exist */
|
||||||
ram.loaded = 1;
|
ram.loaded = 1;
|
||||||
|
@ -249,7 +249,7 @@ int sram_save(void)
|
||||||
char meow[500];
|
char meow[500];
|
||||||
|
|
||||||
/* If we crash before we ever loaded sram, DO NOT SAVE! */
|
/* If we crash before we ever loaded sram, DO NOT SAVE! */
|
||||||
if (!mbc.batt || !sramfile || !ram.loaded || !mbc.ramsize)
|
if (!mbc.batt || !ram.loaded || !mbc.ramsize)
|
||||||
return -1;
|
return -1;
|
||||||
fd = open(sramfile, O_WRONLY|O_CREAT|O_TRUNC);
|
fd = open(sramfile, O_WRONLY|O_CREAT|O_TRUNC);
|
||||||
if (fd<0) return -1;
|
if (fd<0) return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue