- fix a bug in ND_DataStruct_Value_Remove() call in ndbech.
This commit is contained in:
parent
f1bcb0126b
commit
e919b5d83c
@ -465,6 +465,7 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_REMOVE";
|
Command_Name = "NDD_CMD_VALUE_REMOVE";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,8 +544,8 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
printf( "Module_Manager() called with an undefined command %d\n", Command);
|
printf( "Module_Manager() called with an undefined command %d\n", Command);
|
||||||
return( NDS_ERRAPI);
|
|
||||||
|
|
||||||
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1015,7 +1016,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
|
|||||||
|
|
||||||
if( ( ND_DataStruct_Value_Find( (void **)&Module_Ptr, *DS_Ptr_Ptr, &Ref_Module) == NDS_OK) && ( Module_Ptr != NULL))
|
if( ( ND_DataStruct_Value_Find( (void **)&Module_Ptr, *DS_Ptr_Ptr, &Ref_Module) == NDS_OK) && ( Module_Ptr != NULL))
|
||||||
{
|
{
|
||||||
if( ND_DataStruct_Value_Remove( *DS_Ptr_Ptr, (void **)&Module_Ptr) == NDS_OK)
|
if( ND_DataStruct_Value_Remove( *DS_Ptr_Ptr, (void *)Module_Ptr) == NDS_OK)
|
||||||
{
|
{
|
||||||
nb_removed++;
|
nb_removed++;
|
||||||
ND_Value_Free( *DS_Ptr_Ptr, Module_Ptr);
|
ND_Value_Free( *DS_Ptr_Ptr, Module_Ptr);
|
||||||
@ -1037,7 +1038,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
|
|||||||
|
|
||||||
if( ( ND_DataStruct_Value_Find( (void **)&Module_Ptr, *DS_Ptr_Ptr, &Ref_Module) == NDS_OK) && ( Module_Ptr != NULL))
|
if( ( ND_DataStruct_Value_Find( (void **)&Module_Ptr, *DS_Ptr_Ptr, &Ref_Module) == NDS_OK) && ( Module_Ptr != NULL))
|
||||||
{
|
{
|
||||||
if( ND_DataStruct_Value_Remove( *DS_Ptr_Ptr, (void **)&Module_Ptr) == NDS_OK)
|
if( ND_DataStruct_Value_Remove( *DS_Ptr_Ptr, (void *)Module_Ptr) == NDS_OK)
|
||||||
{
|
{
|
||||||
nb_removed++;
|
nb_removed++;
|
||||||
ND_Value_Free( *DS_Ptr_Ptr, Module_Ptr);
|
ND_Value_Free( *DS_Ptr_Ptr, Module_Ptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user