[glib: 1/2] gdbusaddress: Drop an unnecessary NULL check
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gdbusaddress: Drop an unnecessary NULL check
- Date: Tue, 18 Aug 2020 10:13:05 +0000 (UTC)
commit 9664ff15ac775a481925fe1878c3b5ba84244926
Author: Philip Withnall <withnall endlessm com>
Date: Tue Aug 18 10:36:26 2020 +0100
gdbusaddress: Drop an unnecessary NULL check
`g_strsplit()` never returns `NULL`, although it can return an empty
strv (i.e. with its first element being `NULL`).
Drop a redundant `NULL` check.
Coverity CID: #1430976
Signed-off-by: Philip Withnall <withnall endlessm com>
gio/gdbusaddress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 6958d7cc6..3dd3cc84b 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -982,7 +982,7 @@ g_dbus_address_get_stream_sync (const gchar *address,
goto out;
}
- for (n = 0; addr_array != NULL && addr_array[n] != NULL; n++)
+ for (n = 0; addr_array[n] != NULL; n++)
{
const gchar *addr = addr_array[n];
GError *this_error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]