Finished const-ifications as suggested by Erik Johansson in
SF Patch tracker [ 1587272 ]. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@109 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
@@ -125,7 +125,7 @@ is_unreserved( char in )
|
||||
* Note :
|
||||
************************************************************************/
|
||||
int
|
||||
is_escaped( char *in )
|
||||
is_escaped( const char *in )
|
||||
{
|
||||
|
||||
if( ( in[0] == '%' ) && ( isxdigit( in[1] ) ) && isxdigit( in[2] ) ) {
|
||||
@@ -204,7 +204,7 @@ replace_escaped( char *in,
|
||||
* Note :
|
||||
************************************************************************/
|
||||
int
|
||||
parse_uric( char *in,
|
||||
parse_uric( const char *in,
|
||||
int max,
|
||||
token * out )
|
||||
{
|
||||
@@ -496,12 +496,12 @@ token_cmp( token * in1,
|
||||
************************************************************************/
|
||||
int
|
||||
parse_port( int max,
|
||||
char *port,
|
||||
const char *port,
|
||||
unsigned short *out )
|
||||
{
|
||||
|
||||
char *finger = port;
|
||||
char *max_ptr = finger + max;
|
||||
const char *finger = port;
|
||||
const char *max_ptr = finger + max;
|
||||
unsigned short temp = 0;
|
||||
|
||||
while( ( finger < max_ptr ) && ( isdigit( *finger ) ) ) {
|
||||
@@ -533,7 +533,7 @@ parse_port( int max,
|
||||
* Note :
|
||||
************************************************************************/
|
||||
int
|
||||
parse_hostport( char *in,
|
||||
parse_hostport( const char *in,
|
||||
int max,
|
||||
hostport_type * out )
|
||||
{
|
||||
@@ -681,7 +681,7 @@ parse_hostport( char *in,
|
||||
* Note :
|
||||
************************************************************************/
|
||||
int
|
||||
parse_scheme( char *in,
|
||||
parse_scheme( const char *in,
|
||||
int max,
|
||||
token * out )
|
||||
{
|
||||
@@ -994,7 +994,7 @@ resolve_rel_url( char *base_url,
|
||||
* Note :
|
||||
************************************************************************/
|
||||
int
|
||||
parse_uri( char *in,
|
||||
parse_uri( const char *in,
|
||||
int max,
|
||||
uri_type * out )
|
||||
{
|
||||
@@ -1074,8 +1074,8 @@ parse_uri_and_unescape( char *in,
|
||||
if( ( ret = parse_uri( in, max, out ) ) != HTTP_SUCCESS )
|
||||
return ret;
|
||||
if( out->pathquery.size > 0 )
|
||||
remove_escaped_chars( out->pathquery.buff, &out->pathquery.size );
|
||||
remove_escaped_chars( (char *)out->pathquery.buff, &out->pathquery.size );
|
||||
if( out->fragment.size > 0 )
|
||||
remove_escaped_chars( out->fragment.buff, &out->fragment.size );
|
||||
remove_escaped_chars( (char *)out->fragment.buff, &out->fragment.size );
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user