From 4fa3480444a64a5be3055cf27d96d8e68d0a1d12 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 3 Aug 2022 20:48:46 +0100 Subject: [PATCH] Formatting: realign run-on parenthesised stuff. My bulk indentation check also turned up a lot of cases where a run-on function call or if statement didn't have its later lines aligned correctly relative to the open paren. I think this is quite easy to do by getting things out of sync (editing the first line of the function call and forgetting to update the rest, perhaps even because you never _saw_ the rest during a search-replace). But a few didn't quite fit into that pattern, in particular an outright misleading case in unix/askpass.c where the second line of a call was aligned neatly below the _wrong_ one of the open parens on the opening line. Restored as many alignments as I could easily find. --- config.c | 24 ++++++++++++------------ crypto/aes-neon.c | 2 +- crypto/des.c | 2 +- crypto/dsa.c | 4 ++-- crypto/ecc-ssh.c | 2 +- crypto/ntru.c | 2 +- crypto/rsa.c | 2 +- import.c | 4 ++-- marshal.h | 2 +- otherbackends/telnet.c | 12 ++++++------ proxy/proxy.c | 12 ++++++------ ssh.h | 10 +++++----- ssh/common.c | 2 +- ssh/login1-server.c | 2 +- ssh/login1.c | 4 ++-- ssh/mainchan.c | 2 +- ssh/sftp.c | 2 +- ssh/sharing.c | 2 +- ssh/verstring.c | 2 +- ssh/x11fwd.c | 2 +- ssh/zlib.c | 6 +++--- sshpubk.c | 2 +- terminal/terminal.c | 2 +- test/testcrypt.c | 6 +++--- unix/askpass.c | 2 +- unix/main-gtk-simple.c | 2 +- unix/sftpserver.c | 2 +- unix/unifont.c | 2 +- unix/window.c | 4 ++-- utils/conf.c | 2 +- utils/debug.c | 4 ++-- windows/controls.c | 6 +++--- windows/dialog.c | 2 +- windows/gss.c | 4 ++-- windows/pageant.c | 10 +++++----- windows/puttygen.c | 10 +++++----- windows/storage.c | 2 +- windows/window.c | 20 ++++++++++---------- 38 files changed, 92 insertions(+), 92 deletions(-) diff --git a/config.c b/config.c index a2537dbb..f77384d5 100644 --- a/config.c +++ b/config.c @@ -602,7 +602,7 @@ static void kexlist_handler(dlgcontrol *ctrl, dlgparam *dlg, } static void hklist_handler(dlgcontrol *ctrl, dlgparam *dlg, - void *data, int event) + void *data, int event) { Conf *conf = (Conf *)data; if (event == EVENT_REFRESH) { @@ -1990,11 +1990,11 @@ void setup_config_box(struct controlbox *b, bool midsession, "Always append to the end of it", I(LGXF_APN), "Ask the user every time", I(LGXF_ASK)); ctrl_checkbox(s, "Flush log file frequently", 'u', - HELPCTX(logging_flush), - conf_checkbox_handler, I(CONF_logflush)); + HELPCTX(logging_flush), + conf_checkbox_handler, I(CONF_logflush)); ctrl_checkbox(s, "Include header", 'i', - HELPCTX(logging_header), - conf_checkbox_handler, I(CONF_logheader)); + HELPCTX(logging_header), + conf_checkbox_handler, I(CONF_logheader)); if ((midsession && protocol == PROT_SSH) || (!midsession && backend_vt_from_proto(PROT_SSH))) { @@ -2476,14 +2476,14 @@ void setup_config_box(struct controlbox *b, bool midsession, I(CONF_tcp_keepalives)); #ifndef NO_IPV6 s = ctrl_getset(b, "Connection", "ipversion", - "Internet protocol version"); + "Internet protocol version"); ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3, - HELPCTX(connection_ipversion), - conf_radiobutton_handler, - I(CONF_addressfamily), - "Auto", 'u', I(ADDRTYPE_UNSPEC), - "IPv4", '4', I(ADDRTYPE_IPV4), - "IPv6", '6', I(ADDRTYPE_IPV6)); + HELPCTX(connection_ipversion), + conf_radiobutton_handler, + I(CONF_addressfamily), + "Auto", 'u', I(ADDRTYPE_UNSPEC), + "IPv4", '4', I(ADDRTYPE_IPV4), + "IPv6", '6', I(ADDRTYPE_IPV6)); #endif { diff --git a/crypto/aes-neon.c b/crypto/aes-neon.c index d47d2fd3..f3b92832 100644 --- a/crypto/aes-neon.c +++ b/crypto/aes-neon.c @@ -211,7 +211,7 @@ static void aes_neon_setkey(ssh_cipher *ciph, const void *vkey) const unsigned char *key = (const unsigned char *)vkey; aes_neon_key_expand(key, ctx->ciph.vt->real_keybits / 32, - ctx->keysched_e, ctx->keysched_d); + ctx->keysched_e, ctx->keysched_d); } static void aes_neon_setiv_cbc(ssh_cipher *ciph, const void *iv) diff --git a/crypto/des.c b/crypto/des.c index e8a26f0a..045b00c0 100644 --- a/crypto/des.c +++ b/crypto/des.c @@ -296,7 +296,7 @@ static inline uint32_t des_S(uint32_t si6420, uint32_t si7531) s73 ^= c73 & t->t73; c73 += 0x00080008; } debug("S out: s40=%08"PRIx32" s62=%08"PRIx32 - " s51=%08"PRIx32" s73=%08"PRIx32"\n", s40, s62, s51, s73); + " s51=%08"PRIx32" s73=%08"PRIx32"\n", s40, s62, s51, s73); /* Final selection within each pair */ s40 ^= (s40 << 4) & ((0xf000/0x004) * (c40 & 0x00040004)); diff --git a/crypto/dsa.c b/crypto/dsa.c index bd005957..71fcd94a 100644 --- a/crypto/dsa.c +++ b/crypto/dsa.c @@ -341,8 +341,8 @@ static int dsa_pubkey_bits(const ssh_keyalg *self, ptrlen pub) } mp_int *dsa_gen_k(const char *id_string, mp_int *modulus, - mp_int *private_key, - unsigned char *digest, int digest_len) + mp_int *private_key, + unsigned char *digest, int digest_len) { /* * The basic DSA signing algorithm is: diff --git a/crypto/ecc-ssh.c b/crypto/ecc-ssh.c index 6f232c79..b51caab0 100644 --- a/crypto/ecc-ssh.c +++ b/crypto/ecc-ssh.c @@ -1705,7 +1705,7 @@ const ssh_kexes ssh_ecdh_kex = { lenof(ec_kex_list), ec_kex_list }; */ const ssh_keyalg *ec_alg_by_oid(int len, const void *oid, - const struct ec_curve **curve) + const struct ec_curve **curve) { static const ssh_keyalg *algs_with_oid[] = { &ssh_ecdsa_nistp256, diff --git a/crypto/ntru.c b/crypto/ntru.c index f1ba118f..c313c0cc 100644 --- a/crypto/ntru.c +++ b/crypto/ntru.c @@ -472,7 +472,7 @@ void ntru_bias(uint16_t *out, const uint16_t *in, unsigned bias, * Given an array of values mod q, multiply each one by a constant. */ void ntru_scale(uint16_t *out, const uint16_t *in, uint16_t scale, - unsigned p, unsigned q) + unsigned p, unsigned q) { SETUP; for (unsigned i = 0; i < p; i++) diff --git a/crypto/rsa.c b/crypto/rsa.c index 2196d1ec..4c4243b8 100644 --- a/crypto/rsa.c +++ b/crypto/rsa.c @@ -548,7 +548,7 @@ static void rsa2_private_blob(ssh_key *key, BinarySink *bs) } static ssh_key *rsa2_new_priv(const ssh_keyalg *self, - ptrlen pub, ptrlen priv) + ptrlen pub, ptrlen priv) { BinarySource src[1]; ssh_key *sshk; diff --git a/import.c b/import.c index 926c98a9..7e0d7b74 100644 --- a/import.c +++ b/import.c @@ -1002,7 +1002,7 @@ static bool openssh_pem_write( /* Append the BIT STRING to the sequence */ put_ber_id_len(seq, 1, sub->len, - ASN1_CLASS_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED); + ASN1_CLASS_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED); put_data(seq, sub->s, sub->len); strbuf_free(sub); @@ -1988,7 +1988,7 @@ static ssh2_userkey *sshcom_read( !memcmp(str.ptr, prefix_rsa, sizeof(prefix_rsa) - 1)) { type = RSA; } else if (str.len > sizeof(prefix_dsa) - 1 && - !memcmp(str.ptr, prefix_dsa, sizeof(prefix_dsa) - 1)) { + !memcmp(str.ptr, prefix_dsa, sizeof(prefix_dsa) - 1)) { type = DSA; } else { errmsg = "key is of unknown type"; diff --git a/marshal.h b/marshal.h index 4d5b0075..b9136292 100644 --- a/marshal.h +++ b/marshal.h @@ -316,7 +316,7 @@ static inline void BinarySource_INIT__(BinarySource *src, ptrlen data) #define get_err(src) (BinarySource_UPCAST(src)->err) #define get_avail(src) (BinarySource_UPCAST(src)->len - \ - BinarySource_UPCAST(src)->pos) + BinarySource_UPCAST(src)->pos) #define get_ptr(src) \ ((const void *)( \ (const unsigned char *)(BinarySource_UPCAST(src)->data) + \ diff --git a/otherbackends/telnet.c b/otherbackends/telnet.c index 73e8f0c4..50945b86 100644 --- a/otherbackends/telnet.c +++ b/otherbackends/telnet.c @@ -448,10 +448,10 @@ static void process_subneg(Telnet *telnet) } bsize = 20; for (eval = conf_get_str_strs(telnet->conf, CONF_environmt, - NULL, &ekey); + NULL, &ekey); eval != NULL; eval = conf_get_str_strs(telnet->conf, CONF_environmt, - ekey, &ekey)) + ekey, &ekey)) bsize += strlen(ekey) + strlen(eval) + 2; user = get_remote_username(telnet->conf); if (user) @@ -464,10 +464,10 @@ static void process_subneg(Telnet *telnet) b[3] = TELQUAL_IS; n = 4; for (eval = conf_get_str_strs(telnet->conf, CONF_environmt, - NULL, &ekey); + NULL, &ekey); eval != NULL; eval = conf_get_str_strs(telnet->conf, CONF_environmt, - ekey, &ekey)) { + ekey, &ekey)) { b[n++] = var; for (e = ekey; *e; e++) b[n++] = *e; @@ -496,10 +496,10 @@ static void process_subneg(Telnet *telnet) logeventf(telnet->logctx, "client subnegotiation: SB %s IS:", telopt(telnet->sb_opt)); for (eval = conf_get_str_strs(telnet->conf, CONF_environmt, - NULL, &ekey); + NULL, &ekey); eval != NULL; eval = conf_get_str_strs(telnet->conf, CONF_environmt, - ekey, &ekey)) { + ekey, &ekey)) { logeventf(telnet->logctx, " %s=%s", ekey, eval); } if (user) diff --git a/proxy/proxy.c b/proxy/proxy.c index 9535a371..b1731c87 100644 --- a/proxy/proxy.c +++ b/proxy/proxy.c @@ -393,8 +393,8 @@ static char *dns_log_msg(const char *host, int addressfamily, } SockAddr *name_lookup(const char *host, int port, char **canonicalname, - Conf *conf, int addressfamily, LogContext *logctx, - const char *reason) + Conf *conf, int addressfamily, LogContext *logctx, + const char *reason) { if (conf_get_int(conf, CONF_proxy_type) != PROXY_NONE && do_proxy_dns(conf) && @@ -581,10 +581,10 @@ Socket *new_connection(SockAddr *addr, const char *hostname, { char *logmsg = dupprintf("Will use %s proxy at %s:%d to connect" - " to %s:%d", vt->type, - conf_get_str(conf, CONF_proxy_host), - conf_get_int(conf, CONF_proxy_port), - hostname, port); + " to %s:%d", vt->type, + conf_get_str(conf, CONF_proxy_host), + conf_get_int(conf, CONF_proxy_port), + hostname, port); plug_log(plug, PLUGLOG_PROXY_MSG, NULL, 0, logmsg, 0); sfree(logmsg); } diff --git a/ssh.h b/ssh.h index bd639566..139acb20 100644 --- a/ssh.h +++ b/ssh.h @@ -515,7 +515,7 @@ struct ec_curve { }; const ssh_keyalg *ec_alg_by_oid(int len, const void *oid, - const struct ec_curve **curve); + const struct ec_curve **curve); const unsigned char *ec_alg_oid(const ssh_keyalg *alg, int *oidlen); extern const int ec_nist_curve_lengths[], n_ec_nist_curve_lengths; extern const int ec_ed_curve_lengths[], n_ec_ed_curve_lengths; @@ -631,8 +631,8 @@ mp_int *ssh_rsakex_decrypt( * Helper function for k generation in DSA, reused in ECDSA */ mp_int *dsa_gen_k(const char *id_string, - mp_int *modulus, mp_int *private_key, - unsigned char *digest, int digest_len); + mp_int *modulus, mp_int *private_key, + unsigned char *digest, int digest_len); struct ssh_cipher { const ssh_cipheralg *vt; @@ -1484,7 +1484,7 @@ bool import_possible(int type); int import_target_type(int type); bool import_encrypted(const Filename *filename, int type, char **comment); bool import_encrypted_s(const Filename *filename, BinarySource *src, - int type, char **comment); + int type, char **comment); int import_ssh1(const Filename *filename, int type, RSAKey *key, char *passphrase, const char **errmsg_p); int import_ssh1_s(BinarySource *src, int type, @@ -1492,7 +1492,7 @@ int import_ssh1_s(BinarySource *src, int type, ssh2_userkey *import_ssh2(const Filename *filename, int type, char *passphrase, const char **errmsg_p); ssh2_userkey *import_ssh2_s(BinarySource *src, int type, - char *passphrase, const char **errmsg_p); + char *passphrase, const char **errmsg_p); bool export_ssh1(const Filename *filename, int type, RSAKey *key, char *passphrase); bool export_ssh2(const Filename *filename, int type, diff --git a/ssh/common.c b/ssh/common.c index e9823a6d..fa5d48d0 100644 --- a/ssh/common.c +++ b/ssh/common.c @@ -1034,7 +1034,7 @@ SeatPromptResult verify_ssh_host_key( seat_dialog_text_append( text, SDT_PARA, "If you were expecting this change and trust the " "new key, %s to update %s's cache and carry on connecting.", - pds->hk_accept_action, appname); + pds->hk_accept_action, appname); seat_dialog_text_append( text, SDT_PARA, "If you want to carry on connecting but without " "updating the cache, %s.", pds->hk_connect_once_action); diff --git a/ssh/login1-server.c b/ssh/login1-server.c index 30ff9026..d01c7f4c 100644 --- a/ssh/login1-server.c +++ b/ssh/login1-server.c @@ -50,7 +50,7 @@ static bool ssh1_login_server_get_specials( PacketProtocolLayer *ppl, add_special_fn_t add_special, void *ctx) { return false; } static void ssh1_login_server_special_cmd(PacketProtocolLayer *ppl, - SessionSpecialCode code, int arg) {} + SessionSpecialCode code, int arg) {} static void ssh1_login_server_reconfigure( PacketProtocolLayer *ppl, Conf *conf) {} diff --git a/ssh/login1.c b/ssh/login1.c index d9f3883e..52aaea0b 100644 --- a/ssh/login1.c +++ b/ssh/login1.c @@ -866,8 +866,8 @@ static void ssh1_login_process_queue(PacketProtocolLayer *ppl) return; } } else if (conf_get_bool(s->conf, CONF_try_tis_auth) && - (s->supported_auths_mask & (1 << SSH1_AUTH_CCARD)) && - !s->ccard_auth_refused) { + (s->supported_auths_mask & (1 << SSH1_AUTH_CCARD)) && + !s->ccard_auth_refused) { ssh1_login_setup_tis_scc(s); s->pwpkt_type = SSH1_CMSG_AUTH_CCARD_RESPONSE; ppl_logevent("Requested CryptoCard authentication"); diff --git a/ssh/mainchan.c b/ssh/mainchan.c index 5c1769ea..52492ff6 100644 --- a/ssh/mainchan.c +++ b/ssh/mainchan.c @@ -344,7 +344,7 @@ static void mainchan_open_failure(Channel *chan, const char *errtext) } static size_t mainchan_send(Channel *chan, bool is_stderr, - const void *data, size_t length) + const void *data, size_t length) { assert(chan->vt == &mainchan_channelvt); mainchan *mc = container_of(chan, mainchan, chan); diff --git a/ssh/sftp.c b/ssh/sftp.c index a76702f8..b92f1fe7 100644 --- a/ssh/sftp.c +++ b/ssh/sftp.c @@ -575,7 +575,7 @@ static bool fxp_got_attrs(struct sftp_packet *pktin, struct fxp_attrs *attrs) } bool fxp_stat_recv(struct sftp_packet *pktin, struct sftp_request *req, - struct fxp_attrs *attrs) + struct fxp_attrs *attrs) { sfree(req); if (pktin->type == SSH_FXP_ATTRS) { diff --git a/ssh/sharing.c b/ssh/sharing.c index 7b52dc09..fae1d0d2 100644 --- a/ssh/sharing.c +++ b/ssh/sharing.c @@ -664,7 +664,7 @@ static struct share_xchannel *share_find_xchannel_by_server } static void share_remove_xchannel(struct ssh_sharing_connstate *cs, - struct share_xchannel *xc) + struct share_xchannel *xc) { del234(cs->xchannels_by_us, xc); del234(cs->xchannels_by_server, xc); diff --git a/ssh/verstring.c b/ssh/verstring.c index 4671903a..567a8e7d 100644 --- a/ssh/verstring.c +++ b/ssh/verstring.c @@ -43,7 +43,7 @@ static void ssh_verstring_handle_input(BinaryPacketProtocol *bpp); static void ssh_verstring_handle_output(BinaryPacketProtocol *bpp); static PktOut *ssh_verstring_new_pktout(int type); static void ssh_verstring_queue_disconnect(BinaryPacketProtocol *bpp, - const char *msg, int category); + const char *msg, int category); static const BinaryPacketProtocolVtable ssh_verstring_vtable = { .free = ssh_verstring_free, diff --git a/ssh/x11fwd.c b/ssh/x11fwd.c index 4a2073e6..c5698f9b 100644 --- a/ssh/x11fwd.c +++ b/ssh/x11fwd.c @@ -495,7 +495,7 @@ static size_t x11_send( while (len > 0 && xconn->data_read < 12 + xconn->auth_psize + xconn->auth_dsize) xconn->auth_data[xconn->data_read++ - 12 - - xconn->auth_psize] = (unsigned char) (len--, *data++); + xconn->auth_psize] = (unsigned char) (len--, *data++); if (xconn->data_read < 12 + xconn->auth_psize + xconn->auth_dsize) return 0; diff --git a/ssh/zlib.c b/ssh/zlib.c index 9ad04ed2..09b4afde 100644 --- a/ssh/zlib.c +++ b/ssh/zlib.c @@ -946,7 +946,7 @@ void zlib_decompress_cleanup(ssh_decompressor *dc) } static int zlib_huflookup(unsigned long *bitsp, int *nbitsp, - struct zlib_table *tab) + struct zlib_table *tab) { unsigned long bits = *bitsp; int nbits = *nbitsp; @@ -1094,7 +1094,7 @@ bool zlib_decompress_block(ssh_decompressor *dc, if (dctx->lenptr >= dctx->hlit + dctx->hdist) { dctx->currlentable = zlib_mktable(dctx->lengths, dctx->hlit); dctx->currdisttable = zlib_mktable(dctx->lengths + dctx->hlit, - dctx->hdist); + dctx->hdist); zlib_freetable(&dctx->lenlentable); dctx->lenlentable = NULL; dctx->state = INBLK; @@ -1112,7 +1112,7 @@ bool zlib_decompress_block(ssh_decompressor *dc, dctx->lenextrabits = (code == 16 ? 2 : code == 17 ? 3 : 7); dctx->lenaddon = (code == 18 ? 11 : 3); dctx->lenrep = (code == 16 && dctx->lenptr > 0 ? - dctx->lengths[dctx->lenptr - 1] : 0); + dctx->lengths[dctx->lenptr - 1] : 0); dctx->state = TREES_LENREP; } break; diff --git a/sshpubk.c b/sshpubk.c index e54b8a35..efc3f2e5 100644 --- a/sshpubk.c +++ b/sshpubk.c @@ -1857,7 +1857,7 @@ static int key_type_s_internal(BinarySource *src) if (find_pubkey_alg_len(get_nonchars(src, " \n")) > 0 && get_chars(src, " ").len == 1 && get_chars(src, "0123456789ABCDEFGHIJKLMNOPQRSTUV" - "WXYZabcdefghijklmnopqrstuvwxyz+/=").len > 0 && + "WXYZabcdefghijklmnopqrstuvwxyz+/=").len > 0 && get_nonchars(src, " \n").len == 0) return SSH_KEYTYPE_SSH2_PUBLIC_OPENSSH; diff --git a/terminal/terminal.c b/terminal/terminal.c index b6d97c4b..5310c650 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -647,7 +647,7 @@ static void makeliteral_truecolour(strbuf *b, termchar *c, unsigned long *state) * Put the used parts of the colour info into the buffer. */ put_byte(b, ((c->truecolour.fg.enabled ? 1 : 0) | - (c->truecolour.bg.enabled ? 2 : 0))); + (c->truecolour.bg.enabled ? 2 : 0))); if (c->truecolour.fg.enabled) { put_byte(b, c->truecolour.fg.r); put_byte(b, c->truecolour.fg.g); diff --git a/test/testcrypt.c b/test/testcrypt.c index 3d845673..fcc116f0 100644 --- a/test/testcrypt.c +++ b/test/testcrypt.c @@ -779,7 +779,7 @@ strbuf *ssh_cipher_decrypt_wrapper(ssh_cipher *c, ptrlen input) } strbuf *ssh_cipher_encrypt_length_wrapper(ssh_cipher *c, ptrlen input, - unsigned long seq) + unsigned long seq) { if (input.len != 4) fatal_error("ssh_cipher_encrypt_length: needs exactly 4 bytes"); @@ -789,7 +789,7 @@ strbuf *ssh_cipher_encrypt_length_wrapper(ssh_cipher *c, ptrlen input, } strbuf *ssh_cipher_decrypt_length_wrapper(ssh_cipher *c, ptrlen input, - unsigned long seq) + unsigned long seq) { if (input.len % ssh_cipher_alg(c)->blksize) fatal_error("ssh_cipher_decrypt_length: needs exactly 4 bytes"); @@ -964,7 +964,7 @@ int16_list *ntru_bias_wrapper(int16_list *in, unsigned bias, } int16_list *ntru_scale_wrapper(int16_list *in, unsigned scale, - unsigned p, unsigned q) + unsigned p, unsigned q) { int16_list_resize(in, p); int16_list *out = make_int16_list(p); diff --git a/unix/askpass.c b/unix/askpass.c index 841912d9..f2cbafac 100644 --- a/unix/askpass.c +++ b/unix/askpass.c @@ -438,7 +438,7 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx, gtk_window_set_title(GTK_WINDOW(ctx->dialog), window_title); gtk_window_set_position(GTK_WINDOW(ctx->dialog), GTK_WIN_POS_CENTER); g_signal_connect(G_OBJECT(ctx->dialog), "delete-event", - G_CALLBACK(askpass_dialog_closed), ctx); + G_CALLBACK(askpass_dialog_closed), ctx); ctx->promptlabel = gtk_label_new(prompt_text); align_label_left(GTK_LABEL(ctx->promptlabel)); gtk_widget_show(ctx->promptlabel); diff --git a/unix/main-gtk-simple.c b/unix/main-gtk-simple.c index 2f09cfbc..4cbb5a31 100644 --- a/unix/main-gtk-simple.c +++ b/unix/main-gtk-simple.c @@ -468,7 +468,7 @@ bool do_cmdline(int argc, char **argv, bool do_everything, Conf *conf) break; /* finished command-line processing */ } else err = true, fprintf(stderr, "%s: -e expects an argument\n", - appname); + appname); } else if (!strcmp(p, "-title")) { EXPECTS_ARG; diff --git a/unix/sftpserver.c b/unix/sftpserver.c index 7257c5c9..453a3ee0 100644 --- a/unix/sftpserver.c +++ b/unix/sftpserver.c @@ -545,7 +545,7 @@ static void uss_read(SftpServer *srv, SftpReplyBuilder *reply, } static void uss_write(SftpServer *srv, SftpReplyBuilder *reply, - ptrlen handle, uint64_t offset, ptrlen data) + ptrlen handle, uint64_t offset, ptrlen data) { UnixSftpServer *uss = container_of(srv, UnixSftpServer, srv); int fd; diff --git a/unix/unifont.c b/unix/unifont.c index 5eaded54..144ec87a 100644 --- a/unix/unifont.c +++ b/unix/unifont.c @@ -2573,7 +2573,7 @@ static void unifontsel_setup_stylelist(unifontsel_internal *fs, continue; /* we're filtering out this font */ } if (!info || !started || strnullcasecmp(currcs, info->charset) || - strnullcasecmp(currstyle, info->style)) { + strnullcasecmp(currstyle, info->style)) { /* * We've either finished a style/charset, or started a * new one, or both. diff --git a/unix/window.c b/unix/window.c index bdf9b598..d1c4bfff 100644 --- a/unix/window.c +++ b/unix/window.c @@ -3062,8 +3062,8 @@ static void gtkwin_clip_write( state->pasteout_data = snewn(len*6, char); state->pasteout_data_len = len*6; state->pasteout_data_len = wc_to_mb(inst->ucsdata.line_codepage, 0, - data, len, state->pasteout_data, - state->pasteout_data_len, NULL); + data, len, state->pasteout_data, + state->pasteout_data_len, NULL); if (state->pasteout_data_len == 0) { sfree(state->pasteout_data); state->pasteout_data = NULL; diff --git a/utils/conf.c b/utils/conf.c index ecd26cd0..246dc3eb 100644 --- a/utils/conf.c +++ b/utils/conf.c @@ -336,7 +336,7 @@ char *conf_get_str_str(Conf *conf, int primary, const char *secondary) } char *conf_get_str_strs(Conf *conf, int primary, - char *subkeyin, char **subkeyout) + char *subkeyin, char **subkeyout) { struct constkey key; struct conf_entry *entry; diff --git a/utils/debug.c b/utils/debug.c index 806b250a..79e437a2 100644 --- a/utils/debug.c +++ b/utils/debug.c @@ -43,8 +43,8 @@ void debug_memdump(const void *buf, int len, bool L) foo[i] = ' '; } else { debug_printf("%c%2.2x", - &p[i] != (unsigned char *) buf - && i % 4 ? '.' : ' ', p[i] + &p[i] != (unsigned char *) buf + && i % 4 ? '.' : ' ', p[i] ); if (p[i] >= ' ' && p[i] <= '~') foo[i] = (char) p[i]; diff --git a/windows/controls.c b/windows/controls.c index 37efc9be..e02e3e3d 100644 --- a/windows/controls.c +++ b/windows/controls.c @@ -1854,7 +1854,7 @@ bool winctrl_handle_command(struct dlgparam *dp, UINT msg, SetMapMode(hdc, MM_TEXT); /* ensure logical units == pixels */ GetTextExtentPoint32(hdc, (char *)c->data, - strlen((char *)c->data), &s); + strlen((char *)c->data), &s); DrawEdge(hdc, &r, EDGE_ETCHED, BF_ADJUST | BF_RECT); TextOut(hdc, r.left + (r.right-r.left-s.cx)/2, @@ -2286,7 +2286,7 @@ void dlg_listbox_addwithid(dlgcontrol *ctrl, dlgparam *dp, msg = (c->ctrl->type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ? LB_ADDSTRING : CB_ADDSTRING); msg2 = (c->ctrl->type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ? - LB_SETITEMDATA : CB_SETITEMDATA); + LB_SETITEMDATA : CB_SETITEMDATA); index = SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, (LPARAM)text); SendDlgItemMessage(dp->hwnd, c->base_id+1, msg2, index, (LPARAM)id); } @@ -2547,7 +2547,7 @@ void dlg_refresh(dlgcontrol *ctrl, dlgparam *dp) i++) { if (c->ctrl && c->ctrl->handler != NULL) c->ctrl->handler(c->ctrl, dp, - dp->data, EVENT_REFRESH); + dp->data, EVENT_REFRESH); } } } else { diff --git a/windows/dialog.c b/windows/dialog.c index 3666bfbc..48e188a6 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -928,7 +928,7 @@ static INT_PTR HostKeyMoreInfoProc(HWND hwnd, UINT msg, WPARAM wParam, MapDialogRect(hwnd, &r); HWND ctl = GetDlgItem(hwnd, IDOK); SetWindowPos(ctl, NULL, r.left, r.top, 0, 0, - SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER); + SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER); r.left = r.top = r.right = 0; r.bottom = 300; diff --git a/windows/gss.c b/windows/gss.c index 646e17fc..8f467cf2 100644 --- a/windows/gss.c +++ b/windows/gss.c @@ -665,8 +665,8 @@ static Ssh_gss_stat ssh_sspi_verify_mic(struct ssh_gss_library *lib, InputSecurityToken[1].pvBuffer = mic->value; winctx->maj_stat = p_VerifySignature(&winctx->context, - &InputBufferDescriptor, - 0, &qop); + &InputBufferDescriptor, + 0, &qop); return winctx->maj_stat; } diff --git a/windows/pageant.c b/windows/pageant.c index 47423b2a..077a6812 100644 --- a/windows/pageant.c +++ b/windows/pageant.c @@ -103,7 +103,7 @@ struct PassphraseProcStruct { * Dialog-box function for the Licence box. */ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: @@ -128,7 +128,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg, * Dialog-box function for the About box. */ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: { @@ -214,7 +214,7 @@ static void end_passphrase_dialog(HWND hwnd, INT_PTR result) * Dialog-box function for the passphrase box. */ static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { struct PassphraseProcStruct *p; @@ -592,7 +592,7 @@ static void prompt_add_keyfile(bool encrypted) * Dialog-box function for the key list box. */ static INT_PTR CALLBACK KeyListProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { static const struct { const char *name; @@ -1865,7 +1865,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) AppendMenu(systray_menu, MF_SEPARATOR, 0, 0); } AppendMenu(systray_menu, MF_ENABLED, IDM_VIEWKEYS, - "&View Keys"); + "&View Keys"); AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY, "Add &Key"); AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY_ENCRYPTED, "Add key (encrypted)"); diff --git a/windows/puttygen.c b/windows/puttygen.c index 4c836873..74d5a7c2 100644 --- a/windows/puttygen.c +++ b/windows/puttygen.c @@ -203,7 +203,7 @@ struct PassphraseProcStruct { * Dialog-box function for the passphrase box. */ static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { static char **passphrase = NULL; struct PassphraseProcStruct *p; @@ -483,7 +483,7 @@ static bool prompt_keyfile(HWND hwnd, char *dlgtitle, * Dialog-box function for the Licence box. */ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: { @@ -522,7 +522,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg, * Dialog-box function for the About box. */ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: @@ -1457,7 +1457,7 @@ static INT_PTR CertInfoProc(HWND hwnd, UINT msg, WPARAM wParam, MapDialogRect(hwnd, &r); HWND ctl = GetDlgItem(hwnd, IDOK); SetWindowPos(ctl, NULL, r.left, r.top, 0, 0, - SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER); + SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER); r.left = r.top = r.right = 0; r.bottom = 300; @@ -1496,7 +1496,7 @@ static INT_PTR CertInfoProc(HWND hwnd, UINT msg, WPARAM wParam, * Dialog-box function for the main PuTTYgen dialog box. */ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { const int DEMO_SCREENSHOT_TIMER_ID = 1230; static const char entropy_msg[] = diff --git a/windows/storage.c b/windows/storage.c index 30147a45..7ac299a9 100644 --- a/windows/storage.c +++ b/windows/storage.c @@ -348,7 +348,7 @@ int check_stored_host_key(const char *hostname, int port, } bool have_ssh_host_key(const char *hostname, int port, - const char *keytype) + const char *keytype) { /* * If we have a host key, check_stored_host_key will return 0 or 2. diff --git a/windows/window.c b/windows/window.c index d810719b..ee6ed580 100644 --- a/windows/window.c +++ b/windows/window.c @@ -1724,8 +1724,8 @@ static void wintw_request_resize(TermWin *tw, int w, int h) height = extra_height + font_height * h; SetWindowPos(wgs.term_hwnd, NULL, 0, 0, width, height, - SWP_NOACTIVATE | SWP_NOCOPYBITS | - SWP_NOMOVE | SWP_NOZORDER); + SWP_NOACTIVATE | SWP_NOCOPYBITS | + SWP_NOMOVE | SWP_NOZORDER); } else { /* * If we're resizing by changing the font, we must tell the @@ -1864,10 +1864,10 @@ static void reset_window(int reinit) { rect.right += (window_border * 2); rect.bottom += (window_border * 2); OffsetRect(&dpi_info.new_wnd_rect, - ((dpi_info.new_wnd_rect.right - dpi_info.new_wnd_rect.left) - - (rect.right - rect.left)) / 2, - ((dpi_info.new_wnd_rect.bottom - dpi_info.new_wnd_rect.top) - - (rect.bottom - rect.top)) / 2); + ((dpi_info.new_wnd_rect.right - dpi_info.new_wnd_rect.left) - + (rect.right - rect.left)) / 2, + ((dpi_info.new_wnd_rect.bottom - dpi_info.new_wnd_rect.top) - + (rect.bottom - rect.top)) / 2); SetWindowPos(wgs.term_hwnd, NULL, dpi_info.new_wnd_rect.left, dpi_info.new_wnd_rect.top, rect.right - rect.left, rect.bottom - rect.top, @@ -1912,7 +1912,7 @@ static void reset_window(int reinit) { */ if ((resize_action == RESIZE_TERM && reinit<=0) || (resize_action == RESIZE_EITHER && reinit<0) || - reinit>0) { + reinit>0) { offset_width = offset_height = window_border; extra_width = wr.right - wr.left - cr.right + cr.left + offset_width*2; extra_height = wr.bottom - wr.top - cr.bottom + cr.top +offset_height*2; @@ -4628,8 +4628,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, break; p += format_small_keypad_key((char *)p, term, sk_key, - shift_state & 1, shift_state & 2, - left_alt, &consumed_alt); + shift_state & 1, shift_state & 2, + left_alt, &consumed_alt); if (consumed_alt) left_alt = false; /* supersedes the usual prefixing of Esc */ return p - output; @@ -5627,7 +5627,7 @@ static void wintw_bell(TermWin *tw, int mode) } else if (mode == BELL_WAVEFILE) { Filename *bell_wavefile = conf_get_filename(conf, CONF_bell_wavefile); if (!p_PlaySound || !p_PlaySound(bell_wavefile->path, NULL, - SND_ASYNC | SND_FILENAME)) { + SND_ASYNC | SND_FILENAME)) { char *buf, *otherbuf; show_mouseptr(true); buf = dupprintf(