[PATCH 3/3] obexd: Fix comparing array to 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Comparing an arrays to 0 is not useful.
---
 obexd/client/pbap.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 57632b4..28203a8 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -1111,9 +1111,6 @@ static gboolean get_databaseid(const GDBusPropertyTable *property,
 	char value[33];
 	const char *pvalue = value;
 
-	if (!pbap->databaseid)
-		return FALSE;
-
 	if (u128_to_string(pbap->databaseid, value, sizeof(value)) < 0)
 		return FALSE;
 
@@ -1137,9 +1134,6 @@ static gboolean get_primary(const GDBusPropertyTable *property,
 	char value[33];
 	const char *pvalue = value;
 
-	if (!pbap->primary)
-		return FALSE;
-
 	if (u128_to_string(pbap->primary, value, sizeof(value)) < 0)
 		return FALSE;
 
@@ -1155,9 +1149,6 @@ static gboolean get_secondary(const GDBusPropertyTable *property,
 	char value[33];
 	const char *pvalue = value;
 
-	if (!pbap->secondary)
-		return FALSE;
-
 	if (u128_to_string(pbap->secondary, value, sizeof(value)) < 0)
 		return FALSE;
 
-- 
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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux