MCPcopy Create free account
hub / github.com/MariaDB/server / PROFILE_DeleteKey

Function PROFILE_DeleteKey

storage/connect/inihandl.cpp:669–695  ·  view source on GitHub ↗

* PROFILE_DeleteKey * * Delete a key from a profile tree. ***********************************************************************/

Source from the content-addressed store, hash-verified

667 * Delete a key from a profile tree.
668 ***********************************************************************/
669static BOOL PROFILE_DeleteKey(PROFILESECTION* *section,
670 LPCSTR section_name, LPCSTR key_name)
671{
672 while (*section) {
673 if ((*section)->name[0] && !stricmp((*section)->name, section_name)) {
674 PROFILEKEY* *key = &(*section)->key;
675
676 while (*key) {
677 if (!stricmp((*key)->name, key_name)) {
678 PROFILEKEY *to_del = *key;
679
680 *key = to_del->next;
681 memfree(to_del->value);
682 free(to_del);
683 return TRUE;
684 } // endif name
685
686 key = &(*key)->next;
687 } // endwhile *key
688
689 } // endif section->name
690
691 section = &(*section)->next;
692 } // endwhile *section
693
694 return FALSE;
695} // end of PROFILE_DeleteKey
696
697
698/***********************************************************************

Callers 1

PROFILE_SetStringFunction · 0.85

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected