mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
Whitespace rationalisation of entire code base.
The number of people has been steadily increasing who read our source code with an editor that thinks tab stops are 4 spaces apart, as opposed to the traditional tty-derived 8 that the PuTTY code expects. So I've been wondering for ages about just fixing it, and switching to a spaces-only policy throughout the code. And I recently found out about 'git blame -w', which should make this change not too disruptive for the purposes of source-control archaeology; so perhaps now is the time. While I'm at it, I've also taken the opportunity to remove all the trailing spaces from source lines (on the basis that git dislikes them, and is the only thing that seems to have a strong opinion one way or the other). Apologies to anyone downstream of this code who has complicated patch sets to rebase past this change. I don't intend it to be needed again.
This commit is contained in:
24
sshshare.c
24
sshshare.c
@ -344,12 +344,12 @@ static unsigned share_find_unused_id
|
||||
low = low_orig;
|
||||
high = high_orig = count234(sharestate->connections);
|
||||
while (high - low > 1) {
|
||||
mid = (high + low) / 2;
|
||||
cs = index234(sharestate->connections, mid);
|
||||
if (cs->id == first + (mid - low_orig))
|
||||
low = mid; /* this one is still in the sequence */
|
||||
else
|
||||
high = mid; /* this one is past the end */
|
||||
mid = (high + low) / 2;
|
||||
cs = index234(sharestate->connections, mid);
|
||||
if (cs->id == first + (mid - low_orig))
|
||||
low = mid; /* this one is still in the sequence */
|
||||
else
|
||||
high = mid; /* this one is past the end */
|
||||
}
|
||||
|
||||
/*
|
||||
@ -368,7 +368,7 @@ static unsigned share_find_unused_id
|
||||
{
|
||||
struct ssh_sharing_connstate dummy;
|
||||
dummy.id = ret;
|
||||
assert(NULL == find234(sharestate->connections, &dummy, NULL));
|
||||
assert(NULL == find234(sharestate->connections, &dummy, NULL));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -581,7 +581,7 @@ static struct share_channel *share_add_channel
|
||||
if (chan->state != UNACKNOWLEDGED) {
|
||||
if (add234(cs->channels_by_server, chan) != chan) {
|
||||
del234(cs->channels_by_us, chan);
|
||||
sfree(chan);
|
||||
sfree(chan);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@ -938,7 +938,7 @@ static void share_disconnect(struct ssh_sharing_connstate *cs,
|
||||
}
|
||||
|
||||
static void share_closing(Plug *plug, const char *error_msg, int error_code,
|
||||
bool calling_back)
|
||||
bool calling_back)
|
||||
{
|
||||
struct ssh_sharing_connstate *cs = container_of(
|
||||
plug, struct ssh_sharing_connstate, plug);
|
||||
@ -1523,7 +1523,7 @@ static void share_got_pkt_from_downstream(struct ssh_sharing_connstate *cs,
|
||||
err = dupprintf("CHANNEL_OPEN_CONFIRMATION packet cited unknown channel %u", (unsigned)server_id);
|
||||
goto confused;
|
||||
}
|
||||
|
||||
|
||||
PUT_32BIT_MSB_FIRST(pkt + id_pos, new_id);
|
||||
|
||||
chan = share_add_channel(cs, old_id, new_id, server_id, OPEN, maxpkt);
|
||||
@ -1846,7 +1846,7 @@ static void share_sent(Plug *plug, size_t bufsize)
|
||||
}
|
||||
|
||||
static void share_listen_closing(Plug *plug, const char *error_msg,
|
||||
int error_code, bool calling_back)
|
||||
int error_code, bool calling_back)
|
||||
{
|
||||
ssh_sharing_state *sharestate =
|
||||
container_of(plug, ssh_sharing_state, plug);
|
||||
@ -1937,7 +1937,7 @@ static int share_listen_accepting(Plug *plug,
|
||||
cs->sock = constructor(ctx, &cs->plug);
|
||||
if ((err = sk_socket_error(cs->sock)) != NULL) {
|
||||
sfree(cs);
|
||||
return err != NULL;
|
||||
return err != NULL;
|
||||
}
|
||||
|
||||
sk_set_frozen(cs->sock, 0);
|
||||
|
Reference in New Issue
Block a user