[Replicant] [PATCH 4/6] client: Fix warning about array comparison to a null pointer

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Tue May 7 13:58:02 UTC 2019


Without that fix we have:
  client.c:32:6: error: comparison of array
  'ril_clients' equal to a null pointer is always
  false [-Werror,-Wtautological-pointer-compare]
        if (ril_clients == NULL || ril_clients_count == 0)
            ^~~~~~~~~~~    ~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client.c b/client.c
index ab66a40..8958fd4 100644
--- a/client.c
+++ b/client.c
@@ -29,7 +29,7 @@ struct ril_client *ril_client_find_id(int id)
 {
 	unsigned int i;
 
-	if (ril_clients == NULL || ril_clients_count == 0)
+	if (ril_clients_count == 0)
 		return NULL;
 
 	for (i = 0; i < ril_clients_count; i++) {
-- 
2.21.0



More information about the Replicant mailing list