2011-03-04 18:33:07

by Szymon Janc

[permalink] [raw]
Subject: [PATCH] Remove duplicated NULL check and debug message

---
src/sdpd-request.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/sdpd-request.c b/src/sdpd-request.c
index 668e190..1722f78 100644
--- a/src/sdpd-request.c
+++ b/src/sdpd-request.c
@@ -557,17 +557,13 @@ static int extract_attrs(sdp_record_t *rec, sdp_list_t *seq, sdp_buf_t *buf)
if (!rec)
return SDP_INVALID_RECORD_HANDLE;

- if (seq) {
- SDPDBG("Entries in attr seq : %d", sdp_list_len(seq));
- } else {
- SDPDBG("NULL attribute descriptor");
- }
-
if (seq == NULL) {
SDPDBG("Attribute sequence is NULL");
return 0;
}

+ SDPDBG("Entries in attr seq : %d", sdp_list_len(seq));
+
sdp_gen_record_pdu(rec, &pdu);

for (; seq; seq = seq->next) {
--
1.7.0.4
on behalf of ST-Ericsson


2011-03-04 18:58:19

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Remove duplicated NULL check and debug message

Hi Szymon,

On Fri, Mar 04, 2011, Szymon Janc wrote:
> ---
> src/sdpd-request.c | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)

This one has also been applied. Thanks.

Johan