diff options
Diffstat (limited to 'nxcomp/src/ChannelEndPoint.cpp')
-rw-r--r-- | nxcomp/src/ChannelEndPoint.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nxcomp/src/ChannelEndPoint.cpp b/nxcomp/src/ChannelEndPoint.cpp index 443c0f290..7768df137 100644 --- a/nxcomp/src/ChannelEndPoint.cpp +++ b/nxcomp/src/ChannelEndPoint.cpp @@ -207,7 +207,10 @@ ChannelEndPoint::getPort(long *port) const { bool ChannelEndPoint::getUnixPath(char **unixPath) const { - if (unixPath) *unixPath = NULL; + if (unixPath) + *unixPath = NULL; + else + return false; long p; char *path = NULL; @@ -227,8 +230,7 @@ ChannelEndPoint::getUnixPath(char **unixPath) const { return false; } - if (unixPath) - *unixPath = strdup(path); + *unixPath = strdup(path); return true; } |