linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santiago Carot Nemesio <scarot@libresoft.es>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/3] SDP
Date: Tue, 27 Apr 2010 15:37:05 +0200	[thread overview]
Message-ID: <1272375425.2157.20.camel@mosquito> (raw)
In-Reply-To: <1272375265.2157.17.camel@mosquito>

This patch set to NULL return value on functions returning 0.

>>From 60e2094bfdb8fcc791b8ef8a64be3e9c0c2274cc Mon Sep 17 00:00:00 2001
From: Santiago Carot Nemesio <sancane@gmail.com>
Date: Tue, 27 Apr 2010 14:09:43 +0200
Subject: [PATCH 2/3] Set to NULL return value on functions returning 0


Signed-off-by: Santiago Carot Nemesio <sancane@gmail.com>
---
 lib/sdp.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index ca16118..667d412 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -1214,7 +1214,7 @@ static sdp_data_t *extract_str(const void *p, int bufsize, int *len)
 	default:
 		SDPERR("Sizeof text string > UINT16_MAX\n");
 		free(d);
-		return 0;
+		return NULL;
 	}
 
 	if (bufsize < n) {
@@ -1771,7 +1771,7 @@ sdp_list_t *sdp_list_append(sdp_list_t *p, void *d)
 	sdp_list_t *q, *n = malloc(sizeof(sdp_list_t));
 
 	if (!n)
-		return 0;
+		return NULL;
 
 	n->data = d;
 	n->next = 0;
@@ -1809,7 +1809,7 @@ sdp_list_t *sdp_list_insert_sorted(sdp_list_t *list, void *d,
 
 	n = malloc(sizeof(sdp_list_t));
 	if (!n)
-		return 0;
+		return NULL;
 	n->data = d;
 	for (q = 0, p = list; p; q = p, p = p->next)
 		if (f(p->data, d) >= 0)
@@ -3466,7 +3466,7 @@ sdp_record_t *sdp_service_attr_req(sdp_session_t *session, uint32_t handle,
 
 	if (reqtype != SDP_ATTR_REQ_INDIVIDUAL && reqtype != SDP_ATTR_REQ_RANGE) {
 		errno = EINVAL;
-		return 0;
+		return NULL;
 	}
 
 	memset(&rsp_concat_buf, 0, sizeof(sdp_buf_t));
-- 
1.6.3.3


  reply	other threads:[~2010-04-27 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 13:34 [PATCH 1/3] SDP Santiago Carot Nemesio
2010-04-27 13:37 ` Santiago Carot Nemesio [this message]
2010-04-27 13:39   ` [PATCH 3/3] SDP Santiago Carot Nemesio
2010-04-27 13:51     ` SDP comments Santiago Carot Nemesio
2010-04-27 15:07       ` Johan Hedberg
2010-04-27 15:05     ` [PATCH 3/3] SDP Johan Hedberg
2010-04-27 15:50       ` Marcel Holtmann
2010-04-27 15:59       ` Santiago Carot Nemesio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272375425.2157.20.camel@mosquito \
    --to=scarot@libresoft.es \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).