diff options
author | Philip Withnall <withnall@endlessm.com> | 2019-03-15 14:19:55 +0000 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-03-15 14:19:55 +0000 |
commit | 8966b0f8b185caf9edb8918fdc96d64eb2980c5c (patch) | |
tree | 84628c77259a6971fc1cfdb25b4b4a9b0d694c62 /gio/gdbusaddress.c | |
parent | 7f9e76d2bcdd73711d868156f92115990fe8dad6 (diff) | |
download | glib-8966b0f8b185caf9edb8918fdc96d64eb2980c5c.tar.gz |
gdbusaddress: Remove some always-true branches
g_strsplit() can never return NULL.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'gio/gdbusaddress.c')
-rw-r--r-- | gio/gdbusaddress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c index d84490ff8..64c60dca9 100644 --- a/gio/gdbusaddress.c +++ b/gio/gdbusaddress.c @@ -456,7 +456,7 @@ _g_dbus_address_parse_entry (const gchar *address_entry, key_value_pairs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); kv_pairs = g_strsplit (s + 1, ",", 0); - for (n = 0; kv_pairs != NULL && kv_pairs[n] != NULL; n++) + for (n = 0; kv_pairs[n] != NULL; n++) { const gchar *kv_pair = kv_pairs[n]; gchar *key; @@ -949,7 +949,7 @@ g_dbus_address_get_stream_sync (const gchar *address, last_error = NULL; addr_array = g_strsplit (address, ";", 0); - if (addr_array != NULL && addr_array[0] == NULL) + if (addr_array[0] == NULL) { last_error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, |