-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg: flashdb: patch to fix struct init
Making the initialization of only one struct member explicit.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
pkg/flashdb/patches/0002-kvdb-Initialize-only-status-explicitly.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From fc0b3d177945f3b15b2cb0c6d07914d705bd6f4e Mon Sep 17 00:00:00 2001 | ||
From: Oleg Hahm <[email protected]> | ||
Date: Wed, 6 Dec 2023 21:57:03 +0100 | ||
Subject: [PATCH 2/2] [kvdb] Initialize only status explicitly | ||
|
||
--- | ||
src/fdb_kvdb.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/fdb_kvdb.c b/src/fdb_kvdb.c | ||
index a1118ce..505ba7b 100644 | ||
--- a/src/fdb_kvdb.c | ||
+++ b/src/fdb_kvdb.c | ||
@@ -937,7 +937,7 @@ static fdb_err_t del_kv(fdb_kvdb_t db, const char *key, fdb_kv_t old_kv, bool co | ||
{ | ||
fdb_err_t result = FDB_NO_ERR; | ||
uint32_t dirty_status_addr; | ||
- struct fdb_kv kv = { FDB_KV_UNUSED }; | ||
+ struct fdb_kv kv = { .status = FDB_KV_UNUSED }; | ||
|
||
#if (KV_STATUS_TABLE_SIZE >= FDB_DIRTY_STATUS_TABLE_SIZE) | ||
uint8_t status_table[KV_STATUS_TABLE_SIZE]; | ||
-- | ||
2.43.0 | ||
|