Skip to content

Commit 61a1b0b

Browse files
committed
Tweaked lfs_gstate_iszero for terseness
1 parent ffafb9c commit 61a1b0b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

lfs.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,9 @@ static inline void lfs_gstate_xor(lfs_gstate_t *a, const lfs_gstate_t *b) {
410410
}
411411

412412
static inline bool lfs_gstate_iszero(const lfs_gstate_t *a) {
413-
if (a->tag != 0) {
414-
return false;
415-
}
416-
if (a->pair[0] != 0) {
417-
return false;
418-
}
419-
if (a->pair[1] != 0) {
420-
return false;
421-
}
422-
return true;
413+
return a->tag == 0
414+
&& a->pair[0] == 0
415+
&& a->pair[1] == 0;
423416
}
424417

425418
#ifndef LFS_READONLY

0 commit comments

Comments
 (0)