Commit c652b55f authored by Christian Beier's avatar Christian Beier Committed by Johannes Schindelin

Fix IsUnixSocket()

This is a pure functionality fix: according to its manpage, stat()
returns 0 on success. Checking for a return value of zero fixes
incorrect results of IsUnixSocket().
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent bdde3f92
......@@ -348,7 +348,7 @@ static rfbBool
IsUnixSocket(const char *name)
{
struct stat sb;
if(stat(name, &sb) && (sb.st_mode & S_IFMT) == S_IFSOCK)
if(stat(name, &sb) == 0 && (sb.st_mode & S_IFMT) == S_IFSOCK)
return TRUE;
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment