Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
a4e7885a
Commit
a4e7885a
authored
Jan 20, 2016
by
Terry Ellison
Browse files
Merge pull request #923 from DiUS/spiffs-alignment-fix-915
Ugly workaround for broken SPIFFS GC alignment.
parents
5cbea0a6
58427563
Changes
1
Show whitespace changes
Inline
Side-by-side
app/spiffs/spiffs_gc.c
View file @
a4e7885a
...
...
@@ -250,6 +250,10 @@ s32_t spiffs_gc_find_candidate(
// divide up work area into block indices and scores
// todo alignment?
// YES DO PROPER ALIGNMENT !^@#%!@%!
if
(
max_candidates
&
1
)
++
max_candidates
;
// HACK WORKAROUND ICK for sizeof(spiffs_block_idx)==2
spiffs_block_ix
*
cand_blocks
=
(
spiffs_block_ix
*
)
fs
->
work
;
s32_t
*
cand_scores
=
(
s32_t
*
)(
fs
->
work
+
max_candidates
*
sizeof
(
spiffs_block_ix
));
...
...
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