mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
avoid nonconst* = const* assignment in ldif_open_url().
This commit is contained in:
parent
8ce3f67c99
commit
cb27c61010
@ -43,23 +43,23 @@ ldif_open_url(
|
||||
LDAP_CONST char *urlstr )
|
||||
{
|
||||
FILE *url;
|
||||
char *p = NULL;
|
||||
#ifdef HAVE_FETCH
|
||||
url = fetchGetURL( (char*) urlstr, "" );
|
||||
|
||||
#else
|
||||
if( strncasecmp( "file:", urlstr, sizeof("file:")-1 ) == 0 ) {
|
||||
p = urlstr + sizeof("file:")-1;
|
||||
char *p;
|
||||
urlstr += sizeof("file:")-1;
|
||||
|
||||
/* we don't check for LDAP_DIRSEP since URLs should contain '/' */
|
||||
if ( p[0] == '/' && p[1] == '/' ) {
|
||||
p += 2;
|
||||
if ( urlstr[0] == '/' && urlstr[1] == '/' ) {
|
||||
urlstr += 2;
|
||||
/* path must be absolute if authority is present */
|
||||
if ( p[0] != '/' )
|
||||
if ( urlstr[0] != '/' )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p = ber_strdup( p );
|
||||
p = ber_strdup( urlstr );
|
||||
ldap_pvt_hex_unescape( p );
|
||||
|
||||
url = fopen( p, "rb" );
|
||||
|
Loading…
Reference in New Issue
Block a user