From 2ea91f834ce8049a4ac63ca577b39f5c92d23a20 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Sun, 5 Jan 2020 16:52:34 +0100 Subject: [PATCH] Add the missing space between "if" and "(" Changelog-None --- channeld/channeld.c | 2 +- common/test/run-param.c | 2 +- common/wallet_tx.c | 2 +- connectd/tor_autoservice.c | 2 +- lightningd/bitcoind.c | 2 +- lightningd/channel_control.c | 4 ++-- lightningd/opening_control.c | 2 +- lightningd/options.c | 2 +- lightningd/peer_htlcs.c | 2 +- plugins/libplugin.c | 2 +- wallet/test/run-wallet.c | 2 +- wallet/wallet.c | 6 +++--- wallet/walletrpc.c | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/channeld/channeld.c b/channeld/channeld.c index 088d2a8bb..3280081f3 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -3036,7 +3036,7 @@ static void init_channel(struct peer *peer) status_debug("option_static_remotekey = %u", option_static_remotekey); - if(remote_ann_node_sig && remote_ann_bitcoin_sig) { + if (remote_ann_node_sig && remote_ann_bitcoin_sig) { peer->announcement_node_sigs[REMOTE] = *remote_ann_node_sig; peer->announcement_bitcoin_sigs[REMOTE] = *remote_ann_bitcoin_sig; peer->have_sigs[REMOTE] = true; diff --git a/common/test/run-param.c b/common/test/run-param.c index 37c91a03d..ab9006299 100644 --- a/common/test/run-param.c +++ b/common/test/run-param.c @@ -554,7 +554,7 @@ static void test_invoice(struct command *cmd, const jsmntok_t *preimagetok; assert(cmd->mode == CMD_USAGE); - if(!param(cmd, buffer, params, + if (!param(cmd, buffer, params, p_req("msatoshi", param_u64, &msatoshi_val), p_req("label", param_label, &label_val), p_req("description", param_escaped_string, &desc_val), diff --git a/common/wallet_tx.c b/common/wallet_tx.c index 4305f6790..c44ca9418 100644 --- a/common/wallet_tx.c +++ b/common/wallet_tx.c @@ -71,7 +71,7 @@ struct command_result *param_utxos(struct command *cmd, "Could not get a txid out of \"%s\"", json_strdup(tmpctx, buffer, &txid_tok)); } - if(!json_to_number(buffer, (const jsmntok_t*)&outnum_tok, outnum)) + if (!json_to_number(buffer, (const jsmntok_t*)&outnum_tok, outnum)) return command_fail(cmd, JSONRPC2_INVALID_PARAMS, "Could not get a vout out of \"%s\"", json_strdup(tmpctx, buffer, &outnum_tok)); diff --git a/connectd/tor_autoservice.c b/connectd/tor_autoservice.c index bbc62dac3..4f6fe0df0 100644 --- a/connectd/tor_autoservice.c +++ b/connectd/tor_autoservice.c @@ -111,7 +111,7 @@ static struct wireaddr *make_onion(const tal_t *ctx, continue; if (use_v3_autotor) - if(strstr(line, "\"0.0") || + if (strstr(line, "\"0.0") || strstr(line, "\"0.1") || strstr(line, "\"0.2") || strstr(line, "\"0.3")) { diff --git a/lightningd/bitcoind.c b/lightningd/bitcoind.c index 01fc6adf0..b9c0131c8 100644 --- a/lightningd/bitcoind.c +++ b/lightningd/bitcoind.c @@ -1051,7 +1051,7 @@ static char* check_blockchain_from_bitcoincli(const tal_t *ctx, args_string(tmpctx, cmd), (int)output_bytes, output); - if(!json_tok_streq(output, valuetok, + if (!json_tok_streq(output, valuetok, chainparams->bip70_name)) return tal_fmt(ctx, "Error blockchain for bitcoin-cli?" " Should be: %s", diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index af3b1a063..f59d56795 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -414,7 +414,7 @@ void peer_start_channeld(struct channel *channel, if (ld->config.ignore_fee_limits) log_debug(channel->log, "Ignoring fee limits!"); - if(!wallet_remote_ann_sigs_load(tmpctx, channel->peer->ld->wallet, channel->dbid, + if (!wallet_remote_ann_sigs_load(tmpctx, channel->peer->ld->wallet, channel->dbid, &remote_ann_node_sig, &remote_ann_bitcoin_sig)) { channel_internal_error(channel, "Could not load remote announcement signatures"); @@ -714,7 +714,7 @@ struct command_result *cancel_channel_before_broadcast(struct command *cmd, /* Check if we broadcast the transaction. (We store the transaction type into DB * before broadcast). */ enum wallet_tx_type type; - if(wallet_transaction_type(cmd->ld->wallet, + if (wallet_transaction_type(cmd->ld->wallet, &cancel_channel->funding_txid, &type)) return command_fail(cmd, LIGHTNINGD, diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index fed0ded1e..aed9f877a 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -1075,7 +1075,7 @@ static struct command_result *json_fund_channel_cancel(struct command *cmd, } if (peer->uncommitted_channel) { - if(!peer->uncommitted_channel->fc || !peer->uncommitted_channel->fc->inflight) + if (!peer->uncommitted_channel->fc || !peer->uncommitted_channel->fc->inflight) return command_fail(cmd, LIGHTNINGD, "No channel funding in progress."); /* Make sure this gets notified if we succeed or cancel */ diff --git a/lightningd/options.c b/lightningd/options.c index ef96b7fd3..63bf937ee 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -344,7 +344,7 @@ static char *opt_set_hsm_password(struct lightningd *ld) fflush(stdout); if (getline(&passwd, &passwd_size, stdin) < 0) return "Could not read password from stdin."; - if(passwd[strlen(passwd) - 1] == '\n') + if (passwd[strlen(passwd) - 1] == '\n') passwd[strlen(passwd) - 1] = '\0'; if (tcsetattr(fileno(stdin), TCSAFLUSH, ¤t_term) != 0) return "Could not restore terminal options."; diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 5dd88833f..0eee0b5f1 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -2197,7 +2197,7 @@ void json_format_forwarding_object(struct json_stream *response, } json_add_string(response, "status", forward_status_name(cur->status)); - if(cur->failcode != 0) { + if (cur->failcode != 0) { json_add_num(response, "failcode", cur->failcode); json_add_string(response, "failreason", onion_type_name(cur->failcode)); diff --git a/plugins/libplugin.c b/plugins/libplugin.c index 51bcda64a..820f8dcb8 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -162,7 +162,7 @@ static struct command *read_json_request(const tal_t *ctx, id = json_get_member(membuf_elems(&conn->mb), toks, "id"); if (id) { cmd->id = tal(cmd, u64); - if(!json_to_u64(membuf_elems(&conn->mb), id, cmd->id)) + if (!json_to_u64(membuf_elems(&conn->mb), id, cmd->id)) plugin_err("JSON id '%*.s' is not a number", id->end - id->start, membuf_elems(&conn->mb) + id->start); diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index 7928c3e55..7636e77d6 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -957,7 +957,7 @@ static bool channelseq(struct channel *c1, struct channel *c2) } CHECK((c1->last_tx != NULL) == (c2->last_tx != NULL)); - if(c1->last_tx) { + if (c1->last_tx) { CHECK(bitcoin_tx_eq(c1->last_tx, c2->last_tx)); } CHECK(memeq(&c1->last_sig, sizeof(c1->last_sig), diff --git a/wallet/wallet.c b/wallet/wallet.c index e8e5f6bc8..36c2e2605 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -3338,7 +3338,7 @@ static bool wallet_forwarded_payment_update(struct wallet *w, db_bind_null(stmt, 3); } - if(failcode != 0) { + if (failcode != 0) { assert(state == FORWARD_FAILED || state == FORWARD_LOCAL_FAILED); db_bind_int(stmt, 4, (int)failcode); } else { @@ -3386,7 +3386,7 @@ void wallet_forwarded_payment_add(struct wallet *w, const struct htlc_in *in, ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);")); db_bind_u64(stmt, 0, in->dbid); - if(out) { + if (out) { db_bind_u64(stmt, 1, out->dbid); db_bind_u64(stmt, 3, out->key.channel->scid->u64); db_bind_amount_msat(stmt, 5, &out->msat); @@ -3411,7 +3411,7 @@ void wallet_forwarded_payment_add(struct wallet *w, const struct htlc_in *in, else db_bind_null(stmt, 8); - if(failcode != 0) { + if (failcode != 0) { assert(state == FORWARD_FAILED || state == FORWARD_LOCAL_FAILED); db_bind_int(stmt, 9, (int)failcode); } else { diff --git a/wallet/walletrpc.c b/wallet/walletrpc.c index dcd00a051..7b1a810cc 100644 --- a/wallet/walletrpc.c +++ b/wallet/walletrpc.c @@ -726,7 +726,7 @@ static struct command_result *json_listaddrs(struct command *cmd, for (s64 keyidx = 0; keyidx <= *bip32_max_index; keyidx++) { - if(keyidx == BIP32_INITIAL_HARDENED_CHILD){ + if (keyidx == BIP32_INITIAL_HARDENED_CHILD){ break; }