diff mbox series

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

Message ID 20221018212800.3967256-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/2] settings: Fix scan-build warning | expand

Commit Message

Luiz Augusto von Dentz Oct. 18, 2022, 9:27 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)) {