Remove the entirely pointless fourth parameter from x11_init().
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 23 Jan 2001 11:02:02 +0000 (11:02 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 23 Jan 2001 11:02:02 +0000 (11:02 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@889 cda61777-01e9-0310-a592-d414129be87e

ssh.c
x11fwd.c

diff --git a/ssh.c b/ssh.c
index e32f51e..ee320af 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -165,7 +165,7 @@ extern const struct ssh_cipher ssh_des;
 extern const struct ssh_cipher ssh_blowfish_ssh1;
 extern const struct ssh_cipher ssh_blowfish_ssh2;
 
-extern char *x11_init (Socket *, char *, void *, char **);
+extern char *x11_init (Socket *, char *, void *);
 extern void x11_close (Socket);
 extern void x11_send  (Socket , char *, int);
 extern void x11_invent_auth(char *, int, char *, int);
@@ -1896,11 +1896,9 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) {
                                PKT_END);
                    logevent("Rejected X11 connect request");
                } else {
-                    char *rh;
-
                    c = smalloc(sizeof(struct ssh_channel));
 
-                   if ( x11_init(&c->u.x11.s, cfg.x11_display, c, &rh) != NULL ) {
+                   if ( x11_init(&c->u.x11.s, cfg.x11_display, c) != NULL ) {
                      logevent("opening X11 forward connection failed");
                      sfree(c);
                      send_packet(SSH1_MSG_CHANNEL_OPEN_FAILURE,
@@ -2908,10 +2906,9 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
                 c = smalloc(sizeof(struct ssh_channel));
 
                 if (typelen == 3 && !memcmp(type, "x11", 3)) {
-                    char *rh;
                     if (!ssh_X11_fwd_enabled)
                         error = "X11 forwarding is not enabled";
-                    else if ( x11_init(&c->u.x11.s, cfg.x11_display, c, &rh) != NULL ) {
+                    else if ( x11_init(&c->u.x11.s, cfg.x11_display, c) != NULL ) {
                         error = "Unable to open an X11 connection";
                     } else {
                         c->type = CHAN_X11;
index c537f2d..b4fecd9 100644 (file)
--- a/x11fwd.c
+++ b/x11fwd.c
@@ -121,13 +121,11 @@ static int x11_receive (Socket s, int urgent, char *data, int len) {
  * 
  * Returns an error message, or NULL on success.
  * also, fills the SocketsStructure
- *
- * Also places the canonical host name into `realhost'.
  */
-char *x11_init (Socket *s, char *display, void *c, char **realhost) {
+char *x11_init (Socket *s, char *display, void *c) {
     SockAddr addr;
     int port;
-    char *err;
+    char *err, *dummy_realhost;
     char host[128];
     int n, displaynum;
     struct X11Private *pr;
@@ -148,7 +146,7 @@ char *x11_init (Socket *s, char *display, void *c, char **realhost) {
     /*
      * Try to find host.
      */
-    addr = sk_namelookup(host, realhost);
+    addr = sk_namelookup(host, &dummy_realhost);
     if ( (err = sk_addr_error(addr)) )
        return err;