Subject: Fwd: [PATCH] Corrected error checking on socket creation

Fwd: [PATCH] Corrected error checking on socket creation

From: Paulo Caetano <paulo.a.o.caetano_at_gmail.com>
Date: Tue, 29 May 2012 17:38:32 +0100

---
 ssh2_multiexec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ssh2_multiexec.c b/ssh2_multiexec.c
index 18fe79b..5bc341f 100644
--- a/ssh2_multiexec.c
+++ b/ssh2_multiexec.c
@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
     */
    sock = socket(AF_INET, SOCK_STREAM, 0);
-       if (socket == -1)
+       if (sock == -1)
               perror("Create socket");
    sin.sin_family = AF_INET;
--
1.7.10
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-05-29