Bug: Corrected struct initialization in C++11

This commit is contained in:
Paul Beckingham 2015-10-12 15:06:22 -04:00
parent cf0dc2c77d
commit 8cf9788060

View file

@ -168,7 +168,7 @@ bool Path::exists () const
////////////////////////////////////////////////////////////////////////////////
bool Path::is_directory () const
{
struct stat s = {0};
struct stat s {};
if (! stat (_data.c_str (), &s) &&
S_ISDIR (s.st_mode))
return true;
@ -188,7 +188,7 @@ bool Path::is_absolute () const
////////////////////////////////////////////////////////////////////////////////
bool Path::is_link () const
{
struct stat s = {0};
struct stat s {};
if (! lstat (_data.c_str (), &s) &&
S_ISLNK (s.st_mode))
return true;