1
0
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:
Jeremy Allison
2002-12-06 19:59:04 +00:00
parent 2c5e33b7f2
commit ccdfed5587
2 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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] )
{