Skip to content

Commit

Permalink
Add the missing space between "if" and "("
Browse files Browse the repository at this point in the history
Changelog-None
  • Loading branch information
vasild authored and cdecker committed Jan 6, 2020
1 parent 0ac91b4 commit 2ea91f8
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion channeld/channeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-param.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion common/wallet_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion connectd/tor_autoservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
2 changes: 1 addition & 1 deletion lightningd/bitcoind.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions lightningd/channel_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lightningd/opening_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lightningd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, &current_term) != 0)
return "Could not restore terminal options.";
Expand Down
2 changes: 1 addition & 1 deletion lightningd/peer_htlcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion plugins/libplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion wallet/test/run-wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion wallet/walletrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2ea91f8

Please sign in to comment.