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

View File

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