Skip to contentSkip to conversation

Fix coding style issue regarding with pointer checks

PATCH Applied Santiago Carot-Nemesio 2 participants 2 messages Nov 17, 2011 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix coding style issue regarding with pointer checks

---
 attrib/gatt-service.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
attrib/gatt-service.c +2 -2
index 3199830..ead3f8e 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.7.3
#1 lore raw

Hi Santiago,

Quoted 3 lines · Santiago Carot-Nemesio
---
 attrib/gatt-service.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied. Thanks.

Johan