From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> g_clear_error() frees err and set it to NULL. This fixes dead code warnings from analyzers. --- android/bluetooth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/bluetooth.c b/android/bluetooth.c index a2ab445..52d816f 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -290,8 +290,7 @@ static void load_adapter_config(void) "General", "DiscoverableTimeout", &gerr); if (gerr) { adapter.discoverable_timeout = DEFAULT_DISCOVERABLE_TIMEOUT; - g_error_free(gerr); - gerr = NULL; + g_clear_error(&gerr); } g_key_file_free(key_file); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html