Don't ignore getcwd return value

The return value should be used.
This commit is contained in:
Markus Mäkelä 2019-04-24 11:08:34 +03:00
parent 4186f39616
commit 2bc0b9c875
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -239,11 +239,11 @@ int test_enum(config::Enum<Enum>& value)
int test_path(config::Path& value)
{
char path[PATH_MAX];
getcwd(path, sizeof(path));
char* strpath = getcwd(path, sizeof(path));
static const TestEntry<config::Path::value_type> entries[] =
{
{path, true, path},
{strpath, true, strpath},
{"/tmp", true, "/tmp"},
{"non-existent", false}