summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-21 22:46:58 +0200
committerToomas Soome <tsoome@me.com>2019-06-24 22:08:20 +0300
commit559f8b540657be5e8d59b0b7017058a7ac6ba4bb (patch)
tree40aa91cb5aa905c7f4edd54463afd59b1f9985af
parentf21450b8fa7a1530d48dc06401e691df1b8965fa (diff)
downloadillumos-joyent-559f8b540657be5e8d59b0b7017058a7ac6ba4bb.tar.gz
11127 libsip: NULL pointer errors
Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/libsip/common/sip_add_hdrs.c98
-rw-r--r--usr/src/lib/libsip/common/sip_headers.c6
-rw-r--r--usr/src/lib/libsip/common/sip_parse_generic.c24
-rw-r--r--usr/src/lib/libsip/common/sip_parse_hdrs.c50
-rw-r--r--usr/src/lib/libsip/common/sip_uri_ui.c4
-rw-r--r--usr/src/lib/libsip/common/sip_xaction_ui.c4
6 files changed, 82 insertions, 104 deletions
diff --git a/usr/src/lib/libsip/common/sip_add_hdrs.c b/usr/src/lib/libsip/common/sip_add_hdrs.c
index 053fc8dd8b..43a8ebae88 100644
--- a/usr/src/lib/libsip/common/sip_add_hdrs.c
+++ b/usr/src/lib/libsip/common/sip_add_hdrs.c
@@ -92,8 +92,8 @@ sip_int_to_str(int i)
static char *
sip_add_aquot_to_str(char *str, boolean_t *alloc)
{
- char *new_str;
- char *tmp = str;
+ char *new_str;
+ char *tmp = str;
int size;
while (isspace(*tmp))
@@ -124,8 +124,8 @@ static int
sip_add_empty_hdr(sip_msg_t sip_msg, char *hdr_name)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
int csize = sizeof (char);
if (sip_msg == NULL || hdr_name == NULL)
@@ -164,8 +164,8 @@ sip_add_2strs_to_msg(sip_msg_t sip_msg, char *hdr_name, char *str1,
boolean_t qstr1, char *str2, char *plist, char sep)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
int csize = sizeof (char);
if (sip_msg == NULL || str1 == NULL || str2 == NULL ||
@@ -237,8 +237,8 @@ sip_add_str_to_msg(sip_msg_t sip_msg, char *hdr_name, char *str, char *plist,
char param_sep)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
int csize = sizeof (char);
if (sip_msg == NULL || str == NULL || (str != NULL && str[0] == '\0'))
@@ -287,8 +287,8 @@ static int
sip_add_int_to_msg(sip_msg_t sip_msg, char *hdr_name, int i, char *plist)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
char *digit_str;
int csize = sizeof (char);
@@ -349,8 +349,8 @@ sip_add_intstr_to_msg(sip_msg_t sip_msg, char *hdr_name, int i, char *s,
char *plist)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
char *digit_str;
int csize = sizeof (char);
@@ -580,7 +580,7 @@ sip_add_allow(sip_msg_t sip_msg, sip_method_t method)
if (method == 0 || method >= MAX_SIP_METHODS)
return (EINVAL);
ret = sip_add_str_to_msg(sip_msg, SIP_ALLOW, sip_methods[method].name,
- NULL, (char)NULL);
+ NULL, 0);
return (ret);
}
@@ -646,8 +646,7 @@ sip_add_content_enc(sip_msg_t sip_msg, char *code)
if (code == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_CONTENT_ENCODE, code, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_CONTENT_ENCODE, code, NULL, 0);
return (ret);
}
@@ -665,8 +664,7 @@ sip_add_content_lang(sip_msg_t sip_msg, char *lang)
if (lang == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_CONTENT_LANG, lang, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_CONTENT_LANG, lang, NULL, 0);
return (ret);
}
@@ -675,7 +673,7 @@ sip_add_content_lang(sip_msg_t sip_msg, char *lang)
* SIP-date = rfc1123-date
* rfc1123-date = wkday "," SP date1 SP time SP "GMT"
* date1 = 2DIGIT SP month SP 4DIGIT
- * ; day month year (e.g., 02 Jun 1982)
+ * ; day month year (e.g., 02 Jun 1982)
* time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
* ; 00:00:00 - 23:59:59
* wkday = "Mon" / "Tue" / "Wed"
@@ -691,7 +689,7 @@ sip_add_date(sip_msg_t sip_msg, char *date)
if (date == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_DATE, date, NULL, (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_DATE, date, NULL, 0);
return (ret);
}
@@ -745,8 +743,7 @@ sip_add_in_reply_to(sip_msg_t sip_msg, char *reply_id)
if (reply_id == NULL)
return (EINVAL);
- r = sip_add_str_to_msg(sip_msg, SIP_IN_REPLY_TO, reply_id, NULL,
- (char)NULL);
+ r = sip_add_str_to_msg(sip_msg, SIP_IN_REPLY_TO, reply_id, NULL, 0);
return (r);
}
@@ -788,8 +785,7 @@ sip_add_mime_version(sip_msg_t sip_msg, char *version)
if (version == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_MIME_VERSION, version, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_MIME_VERSION, version, NULL, 0);
return (ret);
}
@@ -805,7 +801,7 @@ sip_add_org(sip_msg_t sip_msg, char *org)
ret = sip_add_empty_hdr(sip_msg, SIP_ORGANIZATION);
} else {
ret = sip_add_str_to_msg(sip_msg, SIP_ORGANIZATION, org, NULL,
- (char)NULL);
+ 0);
}
return (ret);
}
@@ -823,7 +819,7 @@ sip_add_priority(sip_msg_t sip_msg, char *prio)
if (prio == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_PRIORITY, prio, NULL, (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_PRIORITY, prio, NULL, 0);
return (ret);
}
@@ -855,8 +851,7 @@ sip_add_privacy(sip_msg_t sip_msg, char *priv_val)
if (priv_val == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_PRIVACY, priv_val, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_PRIVACY, priv_val, NULL, 0);
return (ret);
}
@@ -871,7 +866,7 @@ sip_add_require(sip_msg_t sip_msg, char *req)
if (req == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_REQUIRE, req, NULL, (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_REQUIRE, req, NULL, 0);
return (ret);
}
@@ -911,7 +906,7 @@ sip_add_server(sip_msg_t sip_msg, char *svr)
if (svr == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_SERVER, svr, NULL, (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_SERVER, svr, NULL, 0);
return (ret);
}
@@ -926,8 +921,8 @@ sip_add_subject(sip_msg_t sip_msg, char *subject)
if (subject == NULL) {
ret = sip_add_empty_hdr(sip_msg, SIP_SUBJECT);
} else {
- ret = sip_add_str_to_msg(sip_msg, SIP_SUBJECT, subject, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_SUBJECT, subject,
+ NULL, 0);
}
return (ret);
}
@@ -945,7 +940,7 @@ sip_add_supported(sip_msg_t sip_msg, char *support)
ret = sip_add_empty_hdr(sip_msg, SIP_SUPPORT);
} else {
ret = sip_add_str_to_msg(sip_msg, SIP_SUPPORT, support, NULL,
- (char)NULL);
+ 0);
}
return (ret);
}
@@ -961,8 +956,7 @@ sip_add_tstamp(sip_msg_t sip_msg, char *time, char *delay)
int ret;
if (delay == NULL) {
- ret = sip_add_str_to_msg(sip_msg, SIP_TIMESTAMP, time, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_TIMESTAMP, time, NULL, 0);
} else {
ret = sip_add_2strs_to_msg(sip_msg, SIP_TIMESTAMP, time,
B_FALSE, delay, NULL, ' ');
@@ -980,8 +974,7 @@ sip_add_unsupported(sip_msg_t sip_msg, char *unsupport)
if (unsupport == NULL)
return (EINVAL);
- ret = sip_add_str_to_msg(sip_msg, SIP_UNSUPPORT, unsupport, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_UNSUPPORT, unsupport, NULL, 0);
return (ret);
}
@@ -995,7 +988,7 @@ sip_add_user_agent(sip_msg_t sip_msg, char *usr)
if (usr == NULL)
return (EINVAL);
- r = sip_add_str_to_msg(sip_msg, SIP_USER_AGENT, usr, NULL, (char)NULL);
+ r = sip_add_str_to_msg(sip_msg, SIP_USER_AGENT, usr, NULL, 0);
return (r);
}
@@ -1013,8 +1006,8 @@ int
sip_add_warning(sip_msg_t sip_msg, int code, char *addr, char *msg)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
char *hdr_name = SIP_WARNING;
if (sip_msg == NULL || addr == NULL || msg == NULL ||
@@ -1060,8 +1053,8 @@ int
sip_add_rack(sip_msg_t sip_msg, int resp_num, int cseq, sip_method_t method)
{
_sip_header_t *new_header;
- int header_size;
- _sip_msg_t *_sip_msg;
+ int header_size;
+ _sip_msg_t *_sip_msg;
char *hdr_name = SIP_RACK;
if (sip_msg == NULL || resp_num <= 0 || cseq < 0 || method <= 0 ||
@@ -1107,8 +1100,8 @@ sip_add_rack(sip_msg_t sip_msg, int resp_num, int cseq, sip_method_t method)
int
sip_add_allow_events(sip_msg_t sip_msg, char *t_event)
{
- return (sip_add_str_to_msg(sip_msg, SIP_ALLOW_EVENTS, t_event, NULL,
- (char)NULL));
+ return (sip_add_str_to_msg(sip_msg, SIP_ALLOW_EVENTS, t_event,
+ NULL, 0));
}
/*
@@ -1130,13 +1123,13 @@ sip_add_event(sip_msg_t sip_msg, char *t_event, char *plist)
/*
* Subscription-State = "Subscription-State" HCOLON substate-value
- * *( SEMI subexp-params )
+ * *( SEMI subexp-params )
* substate-value = "active" / "pending" / "terminated"
* / extension-substate
* extension-substate = token
* subexp-params = ("reason" EQUAL event-reason-value)
* / ("expires" EQUAL delta-seconds)*
- * / ("retry-after" EQUAL delta-seconds)
+ * / ("retry-after" EQUAL delta-seconds)
* / generic-param
* event-reason-value = "deactivated"
* / "probation"
@@ -1176,7 +1169,7 @@ sip_add_substate(sip_msg_t sip_msg, char *sub, char *plist)
* dresponse = "response" EQUAL request-digest
* request-digest = LDQUOT 32LHEX RDQUOT
* auth-param = auth-param-name EQUAL
- * ( token / quoted-string )
+ * ( token / quoted-string )
* auth-param-name = token
* other-response = auth-scheme LWS auth-param
* *(COMMA auth-param)
@@ -1201,8 +1194,7 @@ sip_add_author(sip_msg_t sip_msg, char *scheme, char *param)
int
sip_add_authen_info(sip_msg_t sip_msg, char *ainfo)
{
- return (sip_add_str_to_msg(sip_msg, SIP_AUTHEN_INFO, ainfo, NULL,
- (char)NULL));
+ return (sip_add_str_to_msg(sip_msg, SIP_AUTHEN_INFO, ainfo, NULL, 0));
}
/*
@@ -1210,7 +1202,7 @@ sip_add_authen_info(sip_msg_t sip_msg, char *ainfo)
* challenge = ("Digest" LWS digest-cln *(COMMA digest-cln))
* / other-challenge
* other-challenge = auth-scheme LWS auth-param
- * *(COMMA auth-param)
+ * *(COMMA auth-param)
* digest-cln = realm / domain / nonce
* / opaque / stale / algorithm
* / qop-options / auth-param
@@ -1254,8 +1246,7 @@ sip_add_proxy_author(sip_msg_t sip_msg, char *paschem, char *paparam)
int
sip_add_proxy_require(sip_msg_t sip_msg, char *opt)
{
- return (sip_add_str_to_msg(sip_msg, SIP_PROXY_REQ, opt, NULL,
- (char)NULL));
+ return (sip_add_str_to_msg(sip_msg, SIP_PROXY_REQ, opt, NULL, 0));
}
/*
@@ -1289,8 +1280,7 @@ sip_add_callid(sip_msg_t sip_msg, char *callid)
return (ENOMEM);
allocd = B_TRUE;
}
- ret = sip_add_str_to_msg(sip_msg, SIP_CALL_ID, callid, NULL,
- (char)NULL);
+ ret = sip_add_str_to_msg(sip_msg, SIP_CALL_ID, callid, NULL, 0);
if (allocd)
free(callid);
return (ret);
@@ -1465,7 +1455,7 @@ int
sip_add_content_length(_sip_msg_t *_sip_msg, int length)
{
_sip_header_t *new_header;
- int header_size;
+ int header_size;
if (_sip_msg == NULL || length < 0)
return (EINVAL);
diff --git a/usr/src/lib/libsip/common/sip_headers.c b/usr/src/lib/libsip/common/sip_headers.c
index d299ab4e79..646c899e8a 100644
--- a/usr/src/lib/libsip/common/sip_headers.c
+++ b/usr/src/lib/libsip/common/sip_headers.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <assert.h>
#include <errno.h>
@@ -727,8 +725,8 @@ _sip_get_header_functions(sip_header_function_t *sip_header_function_table,
return (NULL);
}
header_name = sip_header->sip_hdr_current;
- if (sip_find_separator(sip_header, SIP_HCOLON, (char)NULL,
- (char)NULL, B_FALSE) != 0) {
+ if (sip_find_separator(sip_header, SIP_HCOLON, 0,
+ 0, B_FALSE) != 0) {
return (NULL);
}
len = sip_header->sip_hdr_current - header_name;
diff --git a/usr/src/lib/libsip/common/sip_parse_generic.c b/usr/src/lib/libsip/common/sip_parse_generic.c
index 98f459b1b0..02401bfa6f 100644
--- a/usr/src/lib/libsip/common/sip_parse_generic.c
+++ b/usr/src/lib/libsip/common/sip_parse_generic.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
@@ -117,11 +115,11 @@ sip_find_separator(_sip_header_t *sip_header, char separator_1st,
continue;
}
if (isspace(*sip_header->sip_hdr_current) ||
- (separator_1st != (char)NULL &&
+ (separator_1st != 0 &&
(*sip_header->sip_hdr_current == separator_1st)) ||
- (separator_2nd != (char)NULL &&
+ (separator_2nd != 0 &&
(*sip_header->sip_hdr_current == separator_2nd)) ||
- (separator_3rd != (char)NULL &&
+ (separator_3rd != 0 &&
(*sip_header->sip_hdr_current == separator_3rd))) {
return (0);
}
@@ -320,7 +318,7 @@ sip_parse_params(_sip_header_t *sip_header, sip_param_t **parsed_list)
if (quoted_name && sip_find_token(sip_header, SIP_QUOTE) != 0) {
return (EPROTO);
} else if (sip_find_separator(sip_header, SIP_SEMI, SIP_COMMA,
- (char)NULL, B_FALSE) != 0) {
+ 0, B_FALSE) != 0) {
return (EPROTO);
}
param->param_value.sip_str_len = sip_header->sip_hdr_current -
@@ -535,7 +533,7 @@ sip_parse_hdr_parser1(_sip_header_t *hdr, sip_parsed_header_t **phdr, char sep)
B_FALSE) == 0) {
char c = *hdr->sip_hdr_current;
- if (isspace(c) && sep == (char)NULL) {
+ if (isspace(c) && sep == 0) {
value->str_val_ptr = value->sip_value_start;
value->str_val_len = hdr->sip_hdr_current -
value->sip_value_start;
@@ -571,7 +569,7 @@ sip_parse_hdr_parser1(_sip_header_t *hdr, sip_parsed_header_t **phdr, char sep)
/*
* two strings, use sip_2strs_t
*/
- if ((sep != (char)NULL) && (c == sep)) {
+ if ((sep != 0) && (c == sep)) {
value->strs1_val_ptr = value->sip_value_start;
value->strs1_val_len = hdr->sip_hdr_current -
value->sip_value_start;
@@ -579,7 +577,7 @@ sip_parse_hdr_parser1(_sip_header_t *hdr, sip_parsed_header_t **phdr, char sep)
value->strs2_val_ptr =
(++hdr->sip_hdr_current);
if (sip_find_separator(hdr, SIP_SEMI, SIP_COMMA,
- (char)NULL, B_FALSE) == 0) {
+ 0, B_FALSE) == 0) {
char t = *(hdr->sip_hdr_current);
value->strs2_val_len =
hdr->sip_hdr_current -
@@ -598,7 +596,7 @@ sip_parse_hdr_parser1(_sip_header_t *hdr, sip_parsed_header_t **phdr, char sep)
hdr->sip_hdr_current;
goto end;
}
- } else if (sep != (char)NULL) {
+ } else if (sep != 0) {
value->sip_value_state = SIP_VALUE_BAD;
goto get_next_val;
}
@@ -827,7 +825,7 @@ sip_parse_hdr_parser3(_sip_header_t *hdr, sip_parsed_header_t **phdr, int type,
cur = value->sip_value_start;
hdr->sip_hdr_current = cur;
if (sip_find_separator(hdr, SIP_COMMA,
- (char)NULL, (char)NULL, B_FALSE) != 0) {
+ 0, 0, B_FALSE) != 0) {
value->strs2_val_ptr = cur;
value->strs2_val_len =
hdr->sip_hdr_current -
@@ -885,7 +883,7 @@ sip_parse_hdr_parser3(_sip_header_t *hdr, sip_parsed_header_t **phdr, int type,
sip_parse_uri_str(&value->str_val, value);
}
- r = sip_find_separator(hdr, SIP_COMMA, SIP_SEMI, (char)NULL,
+ r = sip_find_separator(hdr, SIP_COMMA, SIP_SEMI, 0,
B_FALSE);
if (r != 0) {
value->sip_value_end = hdr->sip_hdr_current;
@@ -1043,7 +1041,7 @@ sip_parse_hdr_parser5(_sip_header_t *hdr, sip_parsed_header_t **phdr,
tmp_param = new_param;
tmp_param->param_name.sip_str_ptr = tmp_cur;
- if (sip_find_separator(hdr, SIP_EQUAL, SIP_COMMA, (char)NULL,
+ if (sip_find_separator(hdr, SIP_EQUAL, SIP_COMMA, 0,
B_FALSE) != 0) {
tmp_param->param_name.sip_str_len =
hdr->sip_hdr_current - tmp_cur;
diff --git a/usr/src/lib/libsip/common/sip_parse_hdrs.c b/usr/src/lib/libsip/common/sip_parse_hdrs.c
index e7ee91acad..39486323b2 100644
--- a/usr/src/lib/libsip/common/sip_parse_hdrs.c
+++ b/usr/src/lib/libsip/common/sip_parse_hdrs.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
@@ -63,9 +61,9 @@ sip_parse_acpt_header(_sip_header_t *sip_header, sip_parsed_header_t **header)
*/
int
sip_parse_acpt_encode_header(_sip_header_t *sip_header,
- sip_parsed_header_t **header)
+ sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -75,11 +73,11 @@ sip_parse_acpt_encode_header(_sip_header_t *sip_header,
*/
int
sip_parse_acpt_lang_header(_sip_header_t *sip_header,
- sip_parsed_header_t **header)
+ sip_parsed_header_t **header)
{
if (sip_is_empty_hdr(sip_header))
return (sip_parse_hdr_empty(sip_header, header));
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -132,8 +130,7 @@ sip_parse_allow_header(_sip_header_t *hdr, sip_parsed_header_t **phdr)
value->sip_value_start = hdr->sip_hdr_current;
value->sip_value_header = parsed_header;
- if (sip_find_separator(hdr, SIP_COMMA, (char)NULL,
- (char)NULL, B_FALSE) == 0) {
+ if (sip_find_separator(hdr, SIP_COMMA, 0, 0, B_FALSE) == 0) {
multi_value = B_TRUE;
}
@@ -196,7 +193,7 @@ int
sip_parse_contentdis_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -207,7 +204,7 @@ int
sip_parse_contentencode_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -221,7 +218,7 @@ int
sip_parse_contentlang_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -355,7 +352,7 @@ int
sip_parse_inreplyto_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -449,7 +446,7 @@ int
sip_parse_privacy_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
@@ -460,7 +457,7 @@ int
sip_parse_require_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -570,7 +567,7 @@ sip_parse_support_header(_sip_header_t *sip_header,
{
if (sip_is_empty_hdr(sip_header))
return (sip_parse_hdr_empty(sip_header, header));
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -654,7 +651,7 @@ int
sip_parse_usupport_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -877,7 +874,7 @@ int
sip_parse_allow_events_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -893,18 +890,18 @@ sip_parse_allow_events_header(_sip_header_t *sip_header,
int
sip_parse_event_header(_sip_header_t *sip_header, sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
* Subscription-State = "Subscription-State" HCOLON substate-value
- * *( SEMI subexp-params )
+ * *( SEMI subexp-params )
* substate-value = "active" / "pending" / "terminated"
* / extension-substate
* extension-substate = token
* subexp-params = ("reason" EQUAL event-reason-value)
* / ("expires" EQUAL delta-seconds)*
- * / ("retry-after" EQUAL delta-seconds)
+ * / ("retry-after" EQUAL delta-seconds)
* / generic-param
* event-reason-value = "deactivated"
* / "probation"
@@ -919,7 +916,7 @@ int
sip_parse_substate_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -944,7 +941,7 @@ sip_parse_substate_header(_sip_header_t *sip_header,
* dresponse = "response" EQUAL request-digest
* request-digest = LDQUOT 32LHEX RDQUOT
* auth-param = auth-param-name EQUAL
- * ( token / quoted-string )
+ * ( token / quoted-string )
* auth-param-name = token
* other-response = auth-scheme LWS auth-param
* *(COMMA auth-param)
@@ -972,7 +969,7 @@ int
sip_parse_ainfo_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -980,7 +977,7 @@ sip_parse_ainfo_header(_sip_header_t *sip_header,
* challenge = ("Digest" LWS digest-cln *(COMMA digest-cln))
* / other-challenge
* other-challenge = auth-scheme LWS auth-param
- * *(COMMA auth-param)
+ * *(COMMA auth-param)
* digest-cln = realm / domain / nonce
* / opaque / stale / algorithm
* / qop-options / auth-param
@@ -1026,7 +1023,7 @@ int
sip_parse_preq_header(_sip_header_t *sip_header,
sip_parsed_header_t **header)
{
- return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
+ return (sip_parse_hdr_parser1(sip_header, header, 0));
}
/*
@@ -1581,8 +1578,7 @@ sip_parse_cftr_header(_sip_header_t *sip_header, sip_parsed_header_t **header)
tmp_ptr = sip_header->sip_hdr_current;
- if (sip_find_separator(sip_header, SIP_RAQUOT, (char)NULL,
- (char)NULL, B_FALSE)) {
+ if (sip_find_separator(sip_header, SIP_RAQUOT, 0, 0, B_FALSE)) {
if (sip_goto_next_value(sip_header) != 0) {
sip_free_cftr_header(parsed_header);
return (EPROTO);
diff --git a/usr/src/lib/libsip/common/sip_uri_ui.c b/usr/src/lib/libsip/common/sip_uri_ui.c
index 5a83f106cc..e49e075de7 100644
--- a/usr/src/lib/libsip/common/sip_uri_ui.c
+++ b/usr/src/lib/libsip/common/sip_uri_ui.c
@@ -23,8 +23,6 @@
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
@@ -236,7 +234,7 @@ sip_get_uri_port(const struct sip_uri *uri, int *error)
_uri = sip_check_get_param(uri, error);
if (_uri == NULL)
- return (NULL);
+ return (0);
if ((_uri->sip_uri_errflags & SIP_URIERR_PORT) != 0) {
if (error != NULL)
diff --git a/usr/src/lib/libsip/common/sip_xaction_ui.c b/usr/src/lib/libsip/common/sip_xaction_ui.c
index bc60dfb07d..b59c3bca44 100644
--- a/usr/src/lib/libsip/common/sip_xaction_ui.c
+++ b/usr/src/lib/libsip/common/sip_xaction_ui.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
@@ -203,7 +201,7 @@ sip_get_trans_state(sip_transaction_t trans, int *error)
if (xaction == NULL) {
if (error != NULL)
*error = EINVAL;
- return (NULL);
+ return (0);
}
return (xaction->sip_xaction_state);
}