- Minor code cleanup and error log fix.

This commit is contained in:
2024-04-24 20:31:34 +02:00
parent 4fbe71e892
commit f1bcb0126b
3 changed files with 26 additions and 26 deletions

View File

@@ -672,7 +672,7 @@ NDT_Status ND_Library_Open_I( int Debug_Mode)
LGT_Status lg_status;
NDG_Base.Debug_Mode = Debug_Mode;
NDG_Base.Debug_Mode = Debug_Mode;
NDG_Base.Open_Status = NDD_TRUE;
if( Debug_Mode == NDD_TRUE)
@@ -2079,7 +2079,7 @@ NDT_Status ND_Index_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id
LG_LOG_INFO_0( "");
}
if( ND_RECURSIVE_CHILD_IS(Recursive_Mode))
if( ND_RECURSIVE_CHILD_IS( Recursive_Mode))
{
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_INFO_PRINT, Out, NDD_RECURSIVE_MODE_PARENT_CHILD, Recursive_Depth, Recursive_Offset);
}
@@ -2166,7 +2166,7 @@ NDT_Status ND_DataStruct_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Recu
status = ND_Index_Info_Print_I( Out, Root_Ptr, idx, NDD_RECURSIVE_MODE_PARENT, 0, Recursive_Offset);
if( ND_ERROR( status)) return( status);
}
return( ND_Index_Info_Print_I( Out, Root_Ptr, NDD_INDEX_PRIMARY, NDD_RECURSIVE_MODE_CHILD, Recursive_Depth, Recursive_Offset));
}
else
@@ -3829,23 +3829,23 @@ NDT_Status ND_Node_Root_Alloc( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_Nb,
status = ND_Allocator_Exec_I( (void **)Root_Ptr_Ptr, ( sizeof( NDT_Root) + sizeof(NDT_Index) * (Index_Nb - 1)), Allocator_Name, Allocator_Ptr, Data_Ptr);
if( ND_ERROR(status)) return( status);
if( strlen(Manager_Name) > NDD_MANAGER_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( (*Root_Ptr_Ptr)->Manager_Name, Manager_Name);
(*Root_Ptr_Ptr)->Manager_Ptr = Manager_Ptr;
if( strlen( Manager_Name) > NDD_MANAGER_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( ( *Root_Ptr_Ptr)->Manager_Name, Manager_Name);
( *Root_Ptr_Ptr)->Manager_Ptr = Manager_Ptr;
if( strlen(Allocator_Name) > NDD_ALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( (*Root_Ptr_Ptr)->Allocator_Name, Allocator_Name);
(*Root_Ptr_Ptr)->Allocator_Ptr = Allocator_Ptr;
if( strlen( Allocator_Name) > NDD_ALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( ( *Root_Ptr_Ptr)->Allocator_Name, Allocator_Name);
( *Root_Ptr_Ptr)->Allocator_Ptr = Allocator_Ptr;
if( strlen(Deallocator_Name) > NDD_DEALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( (*Root_Ptr_Ptr)->Deallocator_Name, Deallocator_Name);
(*Root_Ptr_Ptr)->Deallocator_Ptr = Deallocator_Ptr;
if( strlen( Deallocator_Name) > NDD_DEALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( ( *Root_Ptr_Ptr)->Deallocator_Name, Deallocator_Name);
( *Root_Ptr_Ptr)->Deallocator_Ptr = Deallocator_Ptr;
(*Root_Ptr_Ptr)->Own_Value = Own_Value;
(*Root_Ptr_Ptr)->User_Ptr = Data_Ptr;
( *Root_Ptr_Ptr)->Own_Value = Own_Value;
( *Root_Ptr_Ptr)->User_Ptr = Data_Ptr;
(*Root_Ptr_Ptr)->Index_Nb = Index_Nb;
(*Root_Ptr_Ptr)->Index_Open_Count = 0;
( *Root_Ptr_Ptr)->Index_Nb = Index_Nb;
( *Root_Ptr_Ptr)->Index_Open_Count = 0;
for( index_id = 0; index_id < Index_Nb; index_id++)
{