mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
Ensure global_scope() returns "", not the NULL string. Froma tpot fix.
Jeremy.
(This used to be commit 0ff254264e
)
This commit is contained in:
@ -140,8 +140,14 @@ BOOL set_global_scope(const char *scope)
|
||||
return True;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Ensure scope is never null string.
|
||||
*********************************************************************/
|
||||
|
||||
const char *global_scope(void)
|
||||
{
|
||||
if (!smb_scope)
|
||||
set_global_scope("");
|
||||
return smb_scope;
|
||||
}
|
||||
|
||||
|
@ -1203,7 +1203,7 @@ int name_mangle( char *In, char *Out, char name_type )
|
||||
p[0] = '\0';
|
||||
|
||||
/* 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] )
|
||||
{
|
||||
|
Reference in New Issue
Block a user