- Minor code cleanup and error log fix.

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

View File

@ -467,13 +467,13 @@ typedef int NDT_Index_Type;
// //
// default: // default:
// { // {
// printf( "ND_Default_Manager() called with an undefined command %d\n", Command); // LG_LOG_ERROR_1( "Manager called with an undefined command: (%d)", Command);
// return(NDS_ERRAPI); // return( NDS_ERRAPI);
// } // }
// } // }
// //
// printf( "ND_Default_Manager() called with command %d (%s)\n", Command, Command_Name); // LG_LOG_ERROR_2( "Manager internal error with command: (%d) name: [%s]", Command, Command_Name);
// return(NDS_OK); // return( NDS_OK);
// } // }
@ -822,7 +822,7 @@ NDD_DLL_API NDT_Status ND_Library_StdErr_Set_C( FILE *);
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Create a new data structure */ /* Create a new data structure */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new sata structure */ /* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (I) Index_Nb: Number of index */ /* (I) Index_Nb: Number of index */
/* (I) Index_Type_Ptr: Array of Index type (List, tree, ...) */ /* (I) Index_Type_Ptr: Array of Index type (List, tree, ...) */
/* (I) Manager_Name: Manager function name */ /* (I) Manager_Name: Manager function name */

View File

@ -2079,7 +2079,7 @@ NDT_Status ND_Index_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id
LG_LOG_INFO_0( ""); 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); status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_INFO_PRINT, Out, NDD_RECURSIVE_MODE_PARENT_CHILD, Recursive_Depth, Recursive_Offset);
} }
@ -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); 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( ND_ERROR(status)) return( status);
if( strlen(Manager_Name) > NDD_MANAGER_NAME_LEN_MAX) return( NDS_ERRAPI); if( strlen( Manager_Name) > NDD_MANAGER_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( (*Root_Ptr_Ptr)->Manager_Name, Manager_Name); strcpy( ( *Root_Ptr_Ptr)->Manager_Name, Manager_Name);
(*Root_Ptr_Ptr)->Manager_Ptr = Manager_Ptr; ( *Root_Ptr_Ptr)->Manager_Ptr = Manager_Ptr;
if( strlen(Allocator_Name) > NDD_ALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI); if( strlen( Allocator_Name) > NDD_ALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( (*Root_Ptr_Ptr)->Allocator_Name, Allocator_Name); strcpy( ( *Root_Ptr_Ptr)->Allocator_Name, Allocator_Name);
(*Root_Ptr_Ptr)->Allocator_Ptr = Allocator_Ptr; ( *Root_Ptr_Ptr)->Allocator_Ptr = Allocator_Ptr;
if( strlen(Deallocator_Name) > NDD_DEALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI); if( strlen( Deallocator_Name) > NDD_DEALLOCATOR_NAME_LEN_MAX) return( NDS_ERRAPI);
strcpy( (*Root_Ptr_Ptr)->Deallocator_Name, Deallocator_Name); strcpy( ( *Root_Ptr_Ptr)->Deallocator_Name, Deallocator_Name);
(*Root_Ptr_Ptr)->Deallocator_Ptr = Deallocator_Ptr; ( *Root_Ptr_Ptr)->Deallocator_Ptr = Deallocator_Ptr;
(*Root_Ptr_Ptr)->Own_Value = Own_Value; ( *Root_Ptr_Ptr)->Own_Value = Own_Value;
(*Root_Ptr_Ptr)->User_Ptr = Data_Ptr; ( *Root_Ptr_Ptr)->User_Ptr = Data_Ptr;
(*Root_Ptr_Ptr)->Index_Nb = Index_Nb; ( *Root_Ptr_Ptr)->Index_Nb = Index_Nb;
(*Root_Ptr_Ptr)->Index_Open_Count = 0; ( *Root_Ptr_Ptr)->Index_Open_Count = 0;
for( index_id = 0; index_id < Index_Nb; index_id++) for( index_id = 0; index_id < Index_Nb; index_id++)
{ {

View File

@ -3,20 +3,20 @@
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* This file is part of LibLog. */ /* This file is part of LibNode. */
/* */ /* */
/* LibLog is free software: you can redistribute it and/or modify it */ /* LibNode is free software: you can redistribute it and/or modify it */
/* under the terms of the GNU General Public License as published by */ /* under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */ /* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */ /* (at your option) any later version. */
/* */ /* */
/* LibLog is distributed in the hope that it will be useful, */ /* LibNode is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */ /* GNU General Public License for more details. */
/* */ /* */
/* You should have received a copy of the GNU General Public License */ /* You should have received a copy of the GNU General Public License */
/* along with Drummer. If not, see <https://www.gnu.org/licenses/>. */ /* along with LibNode. If not, see <https://www.gnu.org/licenses/>. */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/