From add3f89005e9a47b40ed82a5831d8618c3e7e08b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 28 Dec 2022 15:37:57 +0000 Subject: [PATCH] Formatting: normalise to { on same line. There were remarkably few of these, but I spotted one while preparing the previous commit, and then found a handful more. --- crypto/ecc-ssh.c | 21 +++++++-------------- proxy/proxy.c | 3 +-- terminal/terminal.c | 3 +-- unix/pageant.c | 3 +-- windows/network.c | 3 +-- windows/window.c | 3 +-- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/crypto/ecc-ssh.c b/crypto/ecc-ssh.c index d3197866..10ed68e6 100644 --- a/crypto/ecc-ssh.c +++ b/crypto/ecc-ssh.c @@ -90,8 +90,7 @@ static struct ec_curve *ec_p256(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff); mp_int *a = MP_LITERAL(0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc); mp_int *b = MP_LITERAL(0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b); @@ -122,8 +121,7 @@ static struct ec_curve *ec_p384(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff); mp_int *a = MP_LITERAL(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc); mp_int *b = MP_LITERAL(0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef); @@ -154,8 +152,7 @@ static struct ec_curve *ec_p521(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); mp_int *a = MP_LITERAL(0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc); mp_int *b = MP_LITERAL(0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00); @@ -186,8 +183,7 @@ static struct ec_curve *ec_curve25519(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed); mp_int *a = MP_LITERAL(0x0000000000000000000000000000000000000000000000000000000000076d06); mp_int *b = MP_LITERAL(0x0000000000000000000000000000000000000000000000000000000000000001); @@ -215,8 +211,7 @@ static struct ec_curve *ec_curve448(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffff); mp_int *a = MP_LITERAL(0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000262a6); mp_int *b = MP_LITERAL(0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001); @@ -244,8 +239,7 @@ static struct ec_curve *ec_ed25519(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed); mp_int *d = MP_LITERAL(0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3); mp_int *a = MP_LITERAL(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec); /* == p-1 */ @@ -281,8 +275,7 @@ static struct ec_curve *ec_ed448(void) static struct ec_curve curve = { 0 }; static bool initialised = false; - if (!initialised) - { + if (!initialised) { mp_int *p = MP_LITERAL(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffff); mp_int *d = MP_LITERAL(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffff6756); /* = p - 39081 */ mp_int *a = MP_LITERAL(0x1); diff --git a/proxy/proxy.c b/proxy/proxy.c index bca60a35..d6811f21 100644 --- a/proxy/proxy.c +++ b/proxy/proxy.c @@ -499,8 +499,7 @@ Socket *new_connection(SockAddr *addr, const char *hostname, int type = conf_get_int(conf, CONF_proxy_type); if (type != PROXY_NONE && - proxy_for_destination(addr, hostname, port, conf)) - { + proxy_for_destination(addr, hostname, port, conf)) { ProxySocket *ps; SockAddr *proxy_addr; char *proxy_canonical_name; diff --git a/terminal/terminal.c b/terminal/terminal.c index c26513e6..b6e11c3f 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -5841,8 +5841,7 @@ static termchar *term_bidi_line(Terminal *term, struct termline *ldata, bidi_char); } - for (it=0; itcols ; it++) - { + for (it=0; itcols ; it++) { unsigned long uc = (ldata->chars[it].chr); switch (uc & CSET_MASK) { diff --git a/unix/pageant.c b/unix/pageant.c index 4558cd37..e813e934 100644 --- a/unix/pageant.c +++ b/unix/pageant.c @@ -669,8 +669,7 @@ void key_find_callback(void *vctx, char **fingerprints, if ((ctx->match_comment && !strcmp(ctx->string, comment)) || (ctx->match_fp && match_fingerprint_string(ctx->string, fingerprints, - ctx))) - { + ctx))) { if (!ctx->found) ctx->found = pageant_pubkey_copy(key); ctx->nfound++; diff --git a/windows/network.c b/windows/network.c index d9716d69..d08f3377 100644 --- a/windows/network.c +++ b/windows/network.c @@ -1707,8 +1707,7 @@ void select_result(WPARAM wParam, LPARAM lParam) memset(&isa, 0, sizeof(isa)); err = 0; t = p_accept(s->s,(struct sockaddr *)&isa,&addrlen); - if (t == INVALID_SOCKET) - { + if (t == INVALID_SOCKET) { err = p_WSAGetLastError(); if (err == WSATRY_AGAIN) break; diff --git a/windows/window.c b/windows/window.c index 4d00fe28..9f666d47 100644 --- a/windows/window.c +++ b/windows/window.c @@ -2816,8 +2816,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, p.rcPaint.left < offset_width || p.rcPaint.top < offset_height || p.rcPaint.right >= offset_width + font_width*wgs->term->cols || - p.rcPaint.bottom>= offset_height + font_height*wgs->term->rows) - { + p.rcPaint.bottom>= offset_height + font_height*wgs->term->rows) { HBRUSH fillcolour, oldbrush; HPEN edge, oldpen; fillcolour = CreateSolidBrush (