mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix a few stylistic warnings from Apple's C compilers.
[originally from svn r2446]
This commit is contained in:
parent
e82053be5c
commit
f10bd67f3a
4
raw.c
4
raw.c
@ -96,7 +96,7 @@ static char *raw_init(void *frontend_handle, void **backend_handle,
|
||||
sfree(buf);
|
||||
}
|
||||
addr = name_lookup(host, port, realhost);
|
||||
if ((err = sk_addr_error(addr)))
|
||||
if ((err = sk_addr_error(addr)) != NULL)
|
||||
return err;
|
||||
|
||||
if (port < 0)
|
||||
@ -113,7 +113,7 @@ static char *raw_init(void *frontend_handle, void **backend_handle,
|
||||
sfree(buf);
|
||||
}
|
||||
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;
|
||||
|
||||
sk_addr_free(addr);
|
||||
|
6
rlogin.c
6
rlogin.c
@ -127,7 +127,7 @@ static char *rlogin_init(void *frontend_handle, void **backend_handle,
|
||||
sfree(buf);
|
||||
}
|
||||
addr = name_lookup(host, port, realhost);
|
||||
if ((err = sk_addr_error(addr)))
|
||||
if ((err = sk_addr_error(addr)) != NULL)
|
||||
return err;
|
||||
|
||||
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,
|
||||
nodelay, (Plug) rlogin);
|
||||
if ((err = sk_socket_error(rlogin->s)))
|
||||
if ((err = sk_socket_error(rlogin->s)) != NULL)
|
||||
return err;
|
||||
|
||||
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, cfg.termtype, strlen(cfg.termtype));
|
||||
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);
|
||||
rlogin->bufsize = sk_write(rlogin->s, &z, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user