============ Cmd_RemoveCommand ============ */
| 646 | ============ |
| 647 | */ |
| 648 | void Cmd_RemoveCommand( const char *cmd_name ) { |
| 649 | cmd_function_t *cmd, **back; |
| 650 | |
| 651 | back = &cmd_functions; |
| 652 | while( 1 ) { |
| 653 | cmd = *back; |
| 654 | if ( !cmd ) { |
| 655 | // command wasn't active |
| 656 | return; |
| 657 | } |
| 658 | if ( !strcmp( cmd_name, cmd->name ) ) { |
| 659 | *back = cmd->next; |
| 660 | if (cmd->name) { |
| 661 | Z_Free(cmd->name); |
| 662 | } |
| 663 | Z_Free (cmd); |
| 664 | return; |
| 665 | } |
| 666 | back = &cmd->next; |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | /* |
| 671 | ============ |
no test coverage detected