1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Fix more "possible unintended assignment" warnings.

[originally from svn r2459]
This commit is contained in:
Ben Harris 2003-01-05 13:04:04 +00:00
parent 30bff47c89
commit 913a9ff22c

View File

@ -127,7 +127,7 @@ char *pfd_newconnect(Socket *s, char *hostname, int port, void *c)
* Try to find host. * Try to find host.
*/ */
addr = name_lookup(hostname, port, &dummy_realhost); addr = name_lookup(hostname, port, &dummy_realhost);
if ((err = sk_addr_error(addr))) if ((err = sk_addr_error(addr)) != NULL)
return err; return err;
/* /*
@ -141,7 +141,7 @@ char *pfd_newconnect(Socket *s, char *hostname, int port, void *c)
pr->backhandle = NULL; /* we shouldn't need this */ pr->backhandle = NULL; /* we shouldn't need this */
pr->s = *s = new_connection(addr, dummy_realhost, port, 0, 1, 0, (Plug) pr); pr->s = *s = new_connection(addr, dummy_realhost, port, 0, 1, 0, (Plug) pr);
if ((err = sk_socket_error(*s))) { if ((err = sk_socket_error(*s)) != NULL) {
sfree(pr); sfree(pr);
return err; return err;
} }
@ -175,7 +175,7 @@ static int pfd_accepting(Plug p, void *sock)
pr->backhandle = org->backhandle; pr->backhandle = org->backhandle;
pr->s = s = sk_register(sock, (Plug) pr); pr->s = s = sk_register(sock, (Plug) pr);
if ((err = sk_socket_error(s))) { if ((err = sk_socket_error(s)) != NULL) {
sfree(pr); sfree(pr);
return err != NULL; return err != NULL;
} }
@ -233,7 +233,7 @@ char *pfd_addforward(char *desthost, int destport, char *srcaddr, int port,
pr->backhandle = backhandle; pr->backhandle = backhandle;
pr->s = s = new_listener(srcaddr, port, (Plug) pr, !cfg.lport_acceptall); pr->s = s = new_listener(srcaddr, port, (Plug) pr, !cfg.lport_acceptall);
if ((err = sk_socket_error(s))) { if ((err = sk_socket_error(s)) != NULL) {
sfree(pr); sfree(pr);
return err; return err;
} }