mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Assert that q can't be NULL. 'empty' is always non-NULL when DIREMPTY
is set earlier. MFC after: 1 month
This commit is contained in:
parent
62c7ea1f1d
commit
f806eb62a4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345839
@ -35,6 +35,7 @@ static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -520,7 +521,8 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat,
|
||||
empcl, empty - buffer,
|
||||
cl, p - buffer, 1) == FSFATAL)
|
||||
return FSFATAL;
|
||||
q = empcl == cl ? empty : buffer;
|
||||
q = ((empcl == cl) ? empty : buffer);
|
||||
assert(q != NULL);
|
||||
for (; q < p; q += 32)
|
||||
*q = SLOT_DELETED;
|
||||
mod |= THISMOD|FSDIRMOD;
|
||||
|
Loading…
Reference in New Issue
Block a user