Skip to content

Commit f903f5f

Browse files
committed
Fix warning about ignored return variable
Signed-off-by: Darby Johnston <[email protected]>
1 parent ab4b550 commit f903f5f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/util.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ std::string normalize_path(std::string const& in)
132132
std::string absolute(std::string const& in)
133133
{
134134
char buf[PATH_MAX];
135-
realpath(in.c_str(), buf);
135+
if (NULL == realpath(in.c_str(), buf))
136+
{
137+
buf[0] = 0;
138+
}
136139
return buf;
137140
}
138141

0 commit comments

Comments
 (0)