mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
Const-correctness in do_select() return value.
The error message it returns on failure is a string literal, so it shouldn't be returned as a mutable 'char *'.
This commit is contained in:
parent
b89d17fbca
commit
58e2a35bdf
@ -845,7 +845,7 @@ static const SocketVtable NetSocket_sockvt = {
|
||||
static Socket *sk_net_accept(accept_ctx_t ctx, Plug *plug)
|
||||
{
|
||||
DWORD err;
|
||||
char *errstr;
|
||||
const char *errstr;
|
||||
NetSocket *ret;
|
||||
|
||||
/*
|
||||
@ -897,7 +897,7 @@ static DWORD try_connect(NetSocket *sock)
|
||||
#endif
|
||||
SOCKADDR_IN a;
|
||||
DWORD err;
|
||||
char *errstr;
|
||||
const char *errstr;
|
||||
short localport;
|
||||
int family;
|
||||
|
||||
@ -1137,7 +1137,7 @@ Socket *sk_newlistener(const char *srcaddr, int port, Plug *plug,
|
||||
SOCKADDR_IN a;
|
||||
|
||||
DWORD err;
|
||||
char *errstr;
|
||||
const char *errstr;
|
||||
NetSocket *ret;
|
||||
int retcode;
|
||||
|
||||
|
@ -45,7 +45,7 @@ SOCKET winselcli_unique_socket(void)
|
||||
return *p;
|
||||
}
|
||||
|
||||
char *do_select(SOCKET skt, bool enable)
|
||||
const char *do_select(SOCKET skt, bool enable)
|
||||
{
|
||||
/* Check everything's been set up, for convenience of callers. */
|
||||
winselcli_setup();
|
||||
|
@ -18,7 +18,7 @@ void winselgui_clear_hwnd(void)
|
||||
winsel_hwnd = NULL;
|
||||
}
|
||||
|
||||
char *do_select(SOCKET skt, bool enable)
|
||||
const char *do_select(SOCKET skt, bool enable)
|
||||
{
|
||||
int msg, events;
|
||||
if (enable) {
|
||||
|
@ -352,7 +352,7 @@ DECL_WINDOWS_FUNCTION(GLOBAL, int, select,
|
||||
* Implemented differently depending on the client of winnet.c, and
|
||||
* called by winnet.c to turn on or off WSA*Select for a given socket.
|
||||
*/
|
||||
char *do_select(SOCKET skt, bool enable);
|
||||
const char *do_select(SOCKET skt, bool enable);
|
||||
|
||||
/*
|
||||
* Exports from winselgui.c and winselcli.c, each of which provides an
|
||||
|
Loading…
Reference in New Issue
Block a user