diff mbox series

[BlueZ,v2,1/3] settings: Fix scan-build warning

Message ID 20221018234600.3990980-1-luiz.dentz@gmail.com
State Superseded
Headers show
Series [BlueZ,v2,1/3] settings: Fix scan-build warning | expand

Commit Message

Luiz Augusto von Dentz Oct. 18, 2022, 11:45 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes the following warning:

src/settings.c:281:7: warning: Branch condition evaluates to a garbage
value [core.uninitialized.Branch]
                if (ret) {
                    ^~~
---
 src/settings.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/settings.c b/src/settings.c
index 0f053000610b..85534f2c7aca 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -269,6 +269,7 @@  static int gatt_db_load(struct gatt_db *db, GKeyFile *key_file, char **keys)
 							&primary, &uuid);
 
 			bt_uuid_to_string(&uuid, uuid_str, sizeof(uuid_str));
+			ret = 0;
 		} else if (g_str_equal(type, GATT_INCLUDE_UUID_STR)) {
 			ret = load_incl(db, *handle, value, current_service);
 		} else if (g_str_equal(type, GATT_CHARAC_UUID_STR)) {