mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-11-16 12:34:34 +00:00
Tweaked lfs_gstate_iszero for terseness
This commit is contained in:
13
lfs.c
13
lfs.c
@@ -410,16 +410,9 @@ static inline void lfs_gstate_xor(lfs_gstate_t *a, const lfs_gstate_t *b) {
|
||||
}
|
||||
|
||||
static inline bool lfs_gstate_iszero(const lfs_gstate_t *a) {
|
||||
if (a->tag != 0) {
|
||||
return false;
|
||||
}
|
||||
if (a->pair[0] != 0) {
|
||||
return false;
|
||||
}
|
||||
if (a->pair[1] != 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return a->tag == 0
|
||||
&& a->pair[0] == 0
|
||||
&& a->pair[1] == 0;
|
||||
}
|
||||
|
||||
#ifndef LFS_READONLY
|
||||
|
||||
Reference in New Issue
Block a user