Removing duplicate code, small fixes.

This commit is contained in:
QC
2014-02-03 22:49:07 +01:00
parent 2bfc2fff4b
commit b9c192c4fe
7 changed files with 37 additions and 95 deletions

View File

@@ -278,20 +278,6 @@ static char ** get_ssh ( )
return retv;
}
static int token_match ( char **tokens, const char *input,
__attribute__( ( unused ) )int index,
__attribute__( ( unused ) )void *data )
{
int match = 1;
// Do a tokenized match.
if ( tokens ) for ( int j = 1; match && tokens[j]; j++ ) {
match = ( strcasestr( input, tokens[j] ) != NULL );
}
return match;
}
SwitcherMode ssh_switcher_dialog ( char **input )
{
SwitcherMode retv = MODE_EXIT;
@@ -324,7 +310,7 @@ SwitcherMode ssh_switcher_dialog ( char **input )
free( cmd_list[i] );
}
free( cmd_list );
if(cmd_list != NULL) free( cmd_list );
return retv;
}