1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

- sorry, forgot to test a pointer

(This used to be commit 1aef522452)
This commit is contained in:
Simo Sorce 2001-07-03 00:23:38 +00:00
parent d6d9375efd
commit 89ee12d373

View File

@ -569,7 +569,9 @@ static BOOL init_structs(void)
*/
/* Work out the max number of netbios aliases that we have */
ptr = lp_netbios_aliases();
for( namecount=0; *ptr; namecount++,ptr++ )
namecount = 0;
if (ptr)
for( ; *ptr; namecount++,ptr++ )
;
if ( *global_myname )
namecount++;
@ -588,6 +590,8 @@ static BOOL init_structs(void)
my_netbios_names[namecount++] = global_myname;
ptr = lp_netbios_aliases();
if (ptr)
{
while ( *ptr )
{
nbname = strdup(*ptr);
@ -611,6 +615,7 @@ static BOOL init_structs(void)
ptr++;
}
}
/* Terminate name list */
my_netbios_names[namecount++] = NULL;