Eliminate str2wcs

This commit is contained in:
ridiculousfish
2012-12-19 13:31:06 -08:00
parent b0a9a5a756
commit 644607c29f
16 changed files with 161 additions and 210 deletions

View File

@@ -188,12 +188,11 @@ static void builtin_wperror(const wchar_t *s)
stderr_buffer.append(L": ");
}
char *err = strerror(errno);
wchar_t *werr = str2wcs(err);
if (werr)
if (err)
{
const wcstring werr = str2wcstring(err);
stderr_buffer.append(werr);
stderr_buffer.push_back(L'\n');
free(werr);
}
}
@@ -3065,7 +3064,7 @@ static int builtin_source(parser_t &parser, wchar_t ** argv)
return STATUS_BUILTIN_ERROR;
}
fn = wrealpath(argv[1], 0);
fn = wrealpath(argv[1], NULL);
if (!fn)
{