if (ssh->version = 2)
if (ssh->version == 2)
static int do_ssh_init(Ssh ssh, unsigned char c){    struct do_ssh_init_state {	int vslen;	char version[10];	char *vstring;	int vstrsize;	int i;	int proto1, proto2;    };    crState(do_ssh_init_state);    crBegin(ssh->do_ssh_init_crstate);    /* Search for the string "SSH-" in the input. */    s->i = 0;    while (1) {	static const int transS[] = { 1, 2, 2, 1 };	static const int transH[] = { 0, 0, 3, 0 };	static const int transminus[] = { 0, 0, 0, -1 };	if (c == 'S')	    s->i = transS[s->i];	else if (c == 'H')	    s->i = transH[s->i];	else if (c == '-')	    s->i = transminus[s->i];	else	    s->i = 0;	if (s->i < 0)	    break;	crReturn(1);		       /* get another character */    }    s->vstrsize = 16;    s->vstring = snewn(s->vstrsize, char);    strcpy(s->vstring, "SSH-");    s->vslen = 4;    s->i = 0;    while (1) {	crReturn(1);		       /* get another char */	if (s->vslen >= s->vstrsize - 1) {	    s->vstrsize += 16;	    s->vstring = sresize(s->vstring, s->vstrsize, char);	}	s->vstring[s->vslen++] = c;	if (s->i >= 0) {	    if (c == '-') {		s->version[s->i] = '\0';		s->i = -1;	    } else if (s->i < sizeof(s->version) - 1)		s->version[s->i++] = c;	} else if (c == '\012')	    break;    }    ssh->agentfwd_enabled = FALSE;    ssh->rdpkt2_state.incoming_sequence = 0;    s->vstring[s->vslen] = 0;    s->vstring[strcspn(s->vstring, "\015\012")] = '\0';/* remove EOL chars */    logeventf(ssh, "Server version: %s", s->vstring);    ssh_detect_bugs(ssh, s->vstring);    /*     * Decide which SSH protocol version to support.     */    /* Anything strictly below "2.0" means protocol 1 is supported. */    s->proto1 = ssh_versioncmp(s->version, "2.0") < 0;    /* Anything greater or equal to "1.99" means protocol 2 is supported. */    s->proto2 = ssh_versioncmp(s->version, "1.99") >= 0;    if (ssh->cfg.sshprot == 0 && !s->proto1) {	bombout(("SSH protocol version 1 required by user but not provided by server"));	crStop(0);    }    if (ssh->cfg.sshprot == 3 && !s->proto2) {	bombout(("SSH protocol version 2 required by user but not provided by server"));	crStop(0);    }    {        char *verstring;        if (s->proto2 && (ssh->cfg.sshprot >= 2 || !s->proto1)) {            /*             * Construct a v2 version string.             */            verstring = dupprintf("SSH-2.0-%s\015\012", sshver);            ssh->version = 2;        } else {            /*             * Construct a v1 version string.             */            verstring = dupprintf("SSH-%s-%s\012",                                  (ssh_versioncmp(s->version, "1.5") <= 0 ?                                   s->version : "1.5"),                                  sshver);            ssh->version = 1;        }        ssh_fix_verstring(verstring);        if (ssh->version == 2) {            /*             * Hash our version string and their version string.             */            SHA_Init(&ssh->exhashbase);            sha_string(&ssh->exhashbase, verstring,                       strcspn(verstring, "\015\012"));            sha_string(&ssh->exhashbase, s->vstring,                       strcspn(s->vstring, "\015\012"));            /*             * Initialise SSH-2 protocol.             */            ssh->protocol = ssh2_protocol;            ssh2_protocol_setup(ssh);            ssh->s_rdpkt = ssh2_rdpkt;        } else {            /*             * Initialise SSH-1 protocol.             */            ssh->protocol = ssh1_protocol;            ssh1_protocol_setup(ssh);            ssh->s_rdpkt = ssh1_rdpkt;        }        logeventf(ssh, "We claim version: %.*s",                  strcspn(verstring, "\015\012"), verstring);	sk_write(ssh->s, verstring, strlen(verstring));        sfree(verstring);	if (ssh->version = 2)	    do_ssh2_transport(ssh, NULL, -1, NULL);    }    logeventf(ssh, "Using SSH protocol version %d", ssh->version);    update_specials_menu(ssh->frontend);    ssh->state = SSH_STATE_BEFORE_SIZE;    ssh->pinger = pinger_new(&ssh->cfg, &ssh_backend, ssh);    sfree(s->vstring);    crFinish(0);}