[PATCH BlueZ 04/13] lib: Cleanup coding style in sdp_get_proto_descs()

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

 



---
 lib/sdp.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index 57abfd8..3c45ac8 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -1864,25 +1864,28 @@ static int sdp_get_proto_descs(uint16_t attr_id, const sdp_record_t *rec,
 							sdp_list_t **pap)
 {
 	sdp_data_t *pdlist, *curr;
-	sdp_list_t *ap = 0;
+	sdp_list_t *ap = NULL;
 
 	pdlist = sdp_data_get(rec, attr_id);
 	if (pdlist == NULL) {
 		errno = ENODATA;
 		return -1;
 	}
-	SDPDBG("AP type : 0%x\n", pdlist->dtd);
+
+	SDPDBG("Attribute value type: 0x%02x\n", pdlist->dtd);
 
 	if (attr_id == SDP_ATTR_ADD_PROTO_DESC_LIST)
 		pdlist = pdlist->val.dataseq;
 
 	for (; pdlist; pdlist = pdlist->next) {
-		sdp_list_t *pds = 0;
+		sdp_list_t *pds = NULL;
 		for (curr = pdlist->val.dataseq; curr; curr = curr->next)
 			pds = sdp_list_append(pds, curr->val.dataseq);
 		ap = sdp_list_append(ap, pds);
 	}
+
 	*pap = ap;
+
 	return 0;
 }
 
-- 
1.7.9.5

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