diff --git a/lib/sdp.c b/lib/sdp.c
index d43bbbd..2e66505 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
/* get attr seq PDU form */
seqlen = gen_attridseq_pdu(pdata, attrids,
reqtype == SDP_ATTR_REQ_INDIVIDUAL? SDP_UINT16 : SDP_UINT32);
- if (seqlen == -1) {
+ if (seqlen < 0) {
errno = EINVAL;
goto end;
}
/* get attr seq PDU form */
seqlen = gen_attridseq_pdu(pdata, attrid_list,
reqtype == SDP_ATTR_REQ_INDIVIDUAL? SDP_UINT16 : SDP_UINT32);
- if (seqlen == -1) {
+ if (seqlen < 0) {
t->err = EINVAL;
goto end;
}
/* get attr seq PDU form */
seqlen = gen_attridseq_pdu(pdata, attrid_list,
reqtype == SDP_ATTR_REQ_INDIVIDUAL ? SDP_UINT16 : SDP_UINT32);
- if (seqlen == -1) {
+ if (seqlen < 0) {
t->err = EINVAL;
goto end;
}
/* get attr seq PDU form */
seqlen = gen_attridseq_pdu(pdata, attrids,
reqtype == SDP_ATTR_REQ_INDIVIDUAL ? SDP_UINT16 : SDP_UINT32);
- if (seqlen == -1) {
+ if (seqlen < 0) {
errno = EINVAL;
status = -1;
goto end;