[PATCH 2/2] Fix error reporting in sdp_service_search_attr_req

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

 



This function reports error code via errno not return value.

---
 lib/sdp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index 9807c8d..36b4d08 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -4346,7 +4346,8 @@ int sdp_service_search_attr_req(sdp_session_t *session, const sdp_list_t *search
 	seqlen = gen_attridseq_pdu(pdata, attrids,
 		reqtype == SDP_ATTR_REQ_INDIVIDUAL ? SDP_UINT16 : SDP_UINT32);
 	if (seqlen == -1) {
-		status = EINVAL;
+		errno = EINVAL;
+		status = -1;
 		goto end;
 	}
 	pdata += seqlen;
-- 
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