[PATCH] Fix coding style issue regarding with pointer checks

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

 



---
 attrib/gatt-service.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/attrib/gatt-service.c b/attrib/gatt-service.c
index 3199830..ead3f8e 100644
--- a/attrib/gatt-service.c
+++ b/attrib/gatt-service.c
@@ -214,7 +214,7 @@ static gboolean add_characteristic(uint16_t *handle, struct gatt_info *info)
 		}
 	}
 
-	if (info->value_handle)
+	if (info->value_handle != NULL)
 		*info->value_handle = a->handle;
 
 	/* client characteristic configuration descriptor */
@@ -227,7 +227,7 @@ static gboolean add_characteristic(uint16_t *handle, struct gatt_info *info)
 		a = attrib_db_add(h++, &bt_uuid, ATT_NONE, ATT_AUTHENTICATION,
 						cfg_val, sizeof(cfg_val));
 
-		if (info->ccc_handle)
+		if (info->ccc_handle != NULL)
 			*info->ccc_handle = a->handle;
 	}
 
-- 
1.7.7.3

--
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