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

Fix a few stylistic warnings from Apple's C compilers.

[originally from svn r2446]
This commit is contained in:
Ben Harris 2003-01-04 16:21:17 +00:00
parent e82053be5c
commit f10bd67f3a
2 changed files with 5 additions and 5 deletions

4
raw.c
View File

@ -96,7 +96,7 @@ static char *raw_init(void *frontend_handle, void **backend_handle,
sfree(buf); sfree(buf);
} }
addr = name_lookup(host, port, realhost); addr = name_lookup(host, port, realhost);
if ((err = sk_addr_error(addr))) if ((err = sk_addr_error(addr)) != NULL)
return err; return err;
if (port < 0) if (port < 0)
@ -113,7 +113,7 @@ static char *raw_init(void *frontend_handle, void **backend_handle,
sfree(buf); sfree(buf);
} }
raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, (Plug) raw); raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, (Plug) raw);
if ((err = sk_socket_error(raw->s))) if ((err = sk_socket_error(raw->s)) != NULL)
return err; return err;
sk_addr_free(addr); sk_addr_free(addr);

View File

@ -127,7 +127,7 @@ static char *rlogin_init(void *frontend_handle, void **backend_handle,
sfree(buf); sfree(buf);
} }
addr = name_lookup(host, port, realhost); addr = name_lookup(host, port, realhost);
if ((err = sk_addr_error(addr))) if ((err = sk_addr_error(addr)) != NULL)
return err; return err;
if (port < 0) if (port < 0)
@ -145,7 +145,7 @@ static char *rlogin_init(void *frontend_handle, void **backend_handle,
} }
rlogin->s = new_connection(addr, *realhost, port, 1, 0, rlogin->s = new_connection(addr, *realhost, port, 1, 0,
nodelay, (Plug) rlogin); nodelay, (Plug) rlogin);
if ((err = sk_socket_error(rlogin->s))) if ((err = sk_socket_error(rlogin->s)) != NULL)
return err; return err;
sk_addr_free(addr); sk_addr_free(addr);
@ -164,7 +164,7 @@ static char *rlogin_init(void *frontend_handle, void **backend_handle,
sk_write(rlogin->s, &z, 1); sk_write(rlogin->s, &z, 1);
sk_write(rlogin->s, cfg.termtype, strlen(cfg.termtype)); sk_write(rlogin->s, cfg.termtype, strlen(cfg.termtype));
sk_write(rlogin->s, "/", 1); sk_write(rlogin->s, "/", 1);
for (p = cfg.termspeed; isdigit(*p); p++); for (p = cfg.termspeed; isdigit(*p); p++) continue;
sk_write(rlogin->s, cfg.termspeed, p - cfg.termspeed); sk_write(rlogin->s, cfg.termspeed, p - cfg.termspeed);
rlogin->bufsize = sk_write(rlogin->s, &z, 1); rlogin->bufsize = sk_write(rlogin->s, &z, 1);
} }