aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-28 20:02:27 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-28 20:02:27 +0200
commit292ed71f0950847e5ec5325f2c6faee5a1901f4d (patch)
tree51d5a06afff2345105ef7184f9671c858b6cf214
parent2d9cd48b1d0ca5302cb729b9d787c0d3174ad14f (diff)
downloadlibssh-292ed71f0950847e5ec5325f2c6faee5a1901f4d.tar.gz
libssh-292ed71f0950847e5ec5325f2c6faee5a1901f4d.tar.xz
libssh-292ed71f0950847e5ec5325f2c6faee5a1901f4d.zip
doc: Fix a check in the doc code.
-rw-r--r--doc/forwarding.dox4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/forwarding.dox b/doc/forwarding.dox
index ba33ae0a..96429174 100644
--- a/doc/forwarding.dox
+++ b/doc/forwarding.dox
@@ -106,7 +106,9 @@ int direct_forwarding(ssh_session session)
int nbytes, nwritten;
forwarding_channel = ssh_channel_new(session);
- if (rc != SSH_OK) return rc;
+ if (forwarding_channel == NULL) {
+ return rc;
+ }
rc = channel_open_forward(forwarding_channel,
"www.google.com", 80,