1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 11:31:00 -05:00

Introduce an enum of the uxsel / select_result flags.

Those magic numbers 1,2,4 were getting annoying. Time to replace them
while I can still remember what they do.
This commit is contained in:
Simon Tatham
2019-02-07 18:13:56 +00:00
parent 9f0e0b02e3
commit 47202c4e16
10 changed files with 40 additions and 39 deletions

View File

@ -104,7 +104,7 @@ static void agent_select_result(int fd, int event)
{
agent_pending_query *conn;
assert(event == 1); /* not selecting for anything but R */
assert(event == SELECT_R); /* not selecting for anything but R */
conn = find234(agent_pending_queries, &fd, agent_connfind);
if (!conn) {
@ -203,7 +203,7 @@ agent_pending_query *agent_query(
agent_pending_queries = newtree234(agent_conncmp);
add234(agent_pending_queries, conn);
uxsel_set(sock, 1, agent_select_result);
uxsel_set(sock, SELECT_R, agent_select_result);
return conn;
failure: