From d4b9a0496e2a1fc6d043e62672fbbd1c5073daa5 Mon Sep 17 00:00:00 2001 From: iysheng Date: Mon, 16 Aug 2021 11:13:43 +0800 Subject: [PATCH] [fdb] Fix mismatch with the comments for status migration when FDB_WRITE_GRAN eq 1 --- src/fdb_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fdb_utils.c b/src/fdb_utils.c index 6da1ffe..7e945ba 100644 --- a/src/fdb_utils.c +++ b/src/fdb_utils.c @@ -102,7 +102,7 @@ size_t _fdb_set_status(uint8_t status_table[], size_t status_num, size_t status_ if (status_index > 0) { #if (FDB_WRITE_GRAN == 1) byte_index = (status_index - 1) / 8; - status_table[byte_index] &= ~(0x80 >> ((status_index - 1) % 8)); + status_table[byte_index] &= (0x00ff >> (status_index % 8)); #else byte_index = (status_index - 1) * (FDB_WRITE_GRAN / 8); status_table[byte_index] = 0x00;