MCPcopy Create free account
hub / github.com/PolySync/oscc / clear_device_names

Function clear_device_names

api/src/oscc.c:1016–1049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1014}
1015
1016oscc_result_t clear_device_names( device_names_s * const names_ptr )
1017{
1018 oscc_result_t result = OSCC_OK;
1019
1020 if( names_ptr == NULL )
1021 {
1022 result = OSCC_ERROR;
1023 }
1024 else
1025 {
1026 uint i;
1027
1028 for ( i = 0; i < names_ptr->size; i++ )
1029 {
1030 if( names_ptr->name[i] != NULL )
1031 {
1032 free( names_ptr->name[i] );
1033
1034 names_ptr->name[i] = NULL;
1035 }
1036
1037 }
1038
1039 if( names_ptr->name != NULL )
1040 {
1041 free( names_ptr->name );
1042
1043 names_ptr->name = NULL;
1044 }
1045
1046 }
1047
1048 return result;
1049}
1050
1051
1052oscc_result_t get_device_name( char * string, char * const name )

Callers 1

oscc_search_canFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected