[X2Go-Commits] [nx-libs] 48/51: Make getUnixPath() return the right value when called without an argument.

git-admin at x2go.org git-admin at x2go.org
Fri Feb 8 05:40:15 CET 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository nx-libs.

commit 5c99eb7d5d3121c4fff11e73b923a4c7a88263fc
Author: Vadim <vtroshchinskiy at qindel.com>
Date:   Fri Jan 18 12:28:51 2019 +0100

    Make getUnixPath() return the right value when called without an argument.
    
    This fixes the verification in validateSpec()
---
 nxcomp/src/ChannelEndPoint.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nxcomp/src/ChannelEndPoint.cpp b/nxcomp/src/ChannelEndPoint.cpp
index 7768df1..635dd1a 100644
--- a/nxcomp/src/ChannelEndPoint.cpp
+++ b/nxcomp/src/ChannelEndPoint.cpp
@@ -209,8 +209,6 @@ ChannelEndPoint::getUnixPath(char **unixPath) const {
 
   if (unixPath)
     *unixPath = NULL;
-  else
-    return false;
 
   long p;
   char *path = NULL;
@@ -230,7 +228,9 @@ ChannelEndPoint::getUnixPath(char **unixPath) const {
       return false;
   }
 
-  *unixPath = strdup(path);
+  // Only return value wanted
+  if ( unixPath )
+    *unixPath = strdup(path);
 
   return true;
 }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list