Removed halloc_wcsdup

This commit is contained in:
ridiculousfish
2012-02-09 18:59:15 -08:00
parent e5ff5f7484
commit 80e8f6a0d1
6 changed files with 9 additions and 45 deletions

View File

@@ -1245,7 +1245,7 @@ void parser_t::parse_job_argument_list( process_t *p,
int matched_wildcard = 0, unmatched_wildcard = 0;
wchar_t *unmatched = 0;
wcstring unmatched;
int unmatched_pos=0;
/*
@@ -1374,9 +1374,9 @@ void parser_t::parse_job_argument_list( process_t *p,
case EXPAND_WILDCARD_NO_MATCH:
{
unmatched_wildcard = 1;
if( !unmatched )
if( unmatched.empty() )
{
unmatched = halloc_wcsdup( j, tok_last( tok ));
unmatched = tok_last(tok);
unmatched_pos = tok_get_pos( tok );
}
@@ -1589,7 +1589,7 @@ void parser_t::parse_job_argument_list( process_t *p,
{
int tmp;
debug( 1, WILDCARD_ERR_MSG, unmatched );
debug( 1, WILDCARD_ERR_MSG, unmatched.c_str() );
tmp = current_tokenizer_pos;
current_tokenizer_pos = unmatched_pos;