mirror of
https://github.com/samba-team/samba.git
synced 2025-12-14 20:23:54 +03:00
Ensure global_scope() returns "", not the NULL string. Froma tpot fix.
Jeremy.
This commit is contained in:
@@ -140,8 +140,14 @@ BOOL set_global_scope(const char *scope)
|
|||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
Ensure scope is never null string.
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
const char *global_scope(void)
|
const char *global_scope(void)
|
||||||
{
|
{
|
||||||
|
if (!smb_scope)
|
||||||
|
set_global_scope("");
|
||||||
return smb_scope;
|
return smb_scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1203,7 +1203,7 @@ int name_mangle( char *In, char *Out, char name_type )
|
|||||||
p[0] = '\0';
|
p[0] = '\0';
|
||||||
|
|
||||||
/* Add the scope string. */
|
/* Add the scope string. */
|
||||||
for( i = 0, len = 0; NULL != global_scope(); i++, len++ )
|
for( i = 0, len = 0; *(global_scope()) != '\0'; i++, len++ )
|
||||||
{
|
{
|
||||||
switch( (global_scope())[i] )
|
switch( (global_scope())[i] )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user