Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
fdc766be
Commit
fdc766be
authored
Nov 08, 2016
by
Arnim Läuger
Committed by
Marcel Stör
Nov 08, 2016
Browse files
fix vfs_lseek() result checking in enduser_setup and clarify SPIFFS_lseek() return value (#1570)
parent
058777ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/modules/enduser_setup.c
View file @
fdc766be
...
@@ -424,7 +424,7 @@ static int enduser_setup_http_load_payload(void)
...
@@ -424,7 +424,7 @@ static int enduser_setup_http_load_payload(void)
c_sprintf
(
cl_hdr
,
http_header_content_len_fmt
,
file_len
);
c_sprintf
(
cl_hdr
,
http_header_content_len_fmt
,
file_len
);
size_t
cl_len
=
c_strlen
(
cl_hdr
);
size_t
cl_len
=
c_strlen
(
cl_hdr
);
if
(
!
f
||
err
!
=
VFS_RES_
OK
||
err2
!
=
VFS_RES_
OK
)
if
(
!
f
||
err
=
=
VFS_RES_
ERR
||
err2
=
=
VFS_RES_
ERR
)
{
{
ENDUSER_SETUP_DEBUG
(
"enduser_setup_http_load_payload unable to load file enduser_setup.html, loading backup HTML."
);
ENDUSER_SETUP_DEBUG
(
"enduser_setup_http_load_payload unable to load file enduser_setup.html, loading backup HTML."
);
...
...
app/spiffs/spiffs.c
View file @
fdc766be
...
@@ -459,7 +459,8 @@ static sint32_t myspiffs_vfs_lseek( const struct vfs_file *fd, sint32_t off, int
...
@@ -459,7 +459,8 @@ static sint32_t myspiffs_vfs_lseek( const struct vfs_file *fd, sint32_t off, int
break
;
break
;
}
}
return
SPIFFS_lseek
(
&
fs
,
fh
,
off
,
spiffs_whence
);
sint32_t
res
=
SPIFFS_lseek
(
&
fs
,
fh
,
off
,
spiffs_whence
);
return
res
>=
0
?
res
:
VFS_RES_ERR
;
}
}
static
sint32_t
myspiffs_vfs_eof
(
const
struct
vfs_file
*
fd
)
{
static
sint32_t
myspiffs_vfs_eof
(
const
struct
vfs_file
*
fd
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment